Click here to Skip to main content
15,887,477 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Protected Overrides Function ProcessCmdKey Pin
paas19-Apr-09 4:09
paas19-Apr-09 4:09 
GeneralRe: Protected Overrides Function ProcessCmdKey Pin
AndyASPVB19-Apr-09 5:11
AndyASPVB19-Apr-09 5:11 
GeneralRe: Protected Overrides Function ProcessCmdKey Pin
paas19-Apr-09 7:04
paas19-Apr-09 7:04 
GeneralRe: Protected Overrides Function ProcessCmdKey Pin
AndyASPVB19-Apr-09 10:33
AndyASPVB19-Apr-09 10:33 
GeneralRe: Protected Overrides Function ProcessCmdKey Pin
HowitZer2623-Jun-09 7:25
HowitZer2623-Jun-09 7:25 
QuestionXML: Writing and Parsing of HTML code Pin
DHalo18-Apr-09 17:26
DHalo18-Apr-09 17:26 
AnswerRe: XML: Writing and Parsing of HTML code Pin
Colin Angus Mackay19-Apr-09 1:11
Colin Angus Mackay19-Apr-09 1:11 
QuestionVoice Command Grammar Loading Error Pin
p00m18-Apr-09 8:37
p00m18-Apr-09 8:37 
Hello everyone

I'm working on a large project wich involves voice command. I've made the basic things (dictation, commands hardcoded with general Grammar) however now i wanted to implement my custom grammar XML file but i keep getting an error. I've gone over almost all the tutorials and scripts i could find on the matter (2 days of nearly non-stop research). So i finaly desided to post here for help.

I'm getting the "ComException was unhandled - Exception from HRESULT: 0x80046052" error on the following code:

Grammar.CmdLoadFromFile("C:\Grammar.xml", SpeechLoadOption.SLOStatic)


Here is a scaled down version of the problem:

Imports System
Imports System.Data
Imports System.Deployment
Imports System.Drawing
Imports System.Windows.Forms
Imports System.Xml

Imports SpeechLib

Public Class Form2
Dim WithEvents RecoContext As SpSharedRecoContext
Dim Grammar As ISpeechRecoGrammar

Private Sub initialize()
        If RecoContext Is Nothing Then
            RecoContext = New SpSharedRecoContext
            Grammar = RecoContext.CreateGrammar(1)
            Grammar.CmdLoadFromFile("c:\Grammar.xml", SpeechLoadOption.SLOStatic)  'Error here
            Grammar.DictationSetState(SpeechRuleState.SGDSInactive)
            Grammar.CmdSetRuleIdState(1, SpeechRuleState.SGDSActive)
        End If
End Sub

Private Sub btnInit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnInit.Click
        initialize()
    End Sub

End Class


Any help would be appreciated!

Thanks in advance

p00m
AnswerRe: Voice Command Grammar Loading Error Pin
Johan Hakkesteegt21-Apr-09 21:32
Johan Hakkesteegt21-Apr-09 21:32 
QuestionNeed help on Visual basic 2008 Express (Microsoft Access Database) Pin
helen0018-Apr-09 7:27
helen0018-Apr-09 7:27 
AnswerRe: Need help on Visual basic 2008 Express (Microsoft Access Database) Pin
Henry Minute18-Apr-09 8:55
Henry Minute18-Apr-09 8:55 
QuestionBrowser Activity Pin
AndyASPVB18-Apr-09 5:00
AndyASPVB18-Apr-09 5:00 
AnswerRe: Browser Activity Pin
Eddy Vluggen18-Apr-09 22:48
professionalEddy Vluggen18-Apr-09 22:48 
QuestionDisable some hot keys Pin
AndyASPVB18-Apr-09 4:57
AndyASPVB18-Apr-09 4:57 
AnswerRe: Disable some hot keys Pin
Zaegra18-Apr-09 5:36
Zaegra18-Apr-09 5:36 
AnswerRe: Disable some hot keys Pin
Eddy Vluggen18-Apr-09 6:57
professionalEddy Vluggen18-Apr-09 6:57 
AnswerRe: Disable some hot keys Pin
Mycroft Holmes18-Apr-09 17:22
professionalMycroft Holmes18-Apr-09 17:22 
GeneralRe: Disable some hot keys Pin
AndyASPVB18-Apr-09 22:41
AndyASPVB18-Apr-09 22:41 
QuestionRefreshing the UI during a long process using VB.NET 3.5 without Application.DoEvents - believe me Ive tried! Pin
Marcus J. Smith18-Apr-09 4:14
professionalMarcus J. Smith18-Apr-09 4:14 
QuestionRe: Refreshing the UI during a long process using VB.NET 3.5 without Application.DoEvents - believe me Ive tried! Pin
Eddy Vluggen18-Apr-09 6:51
professionalEddy Vluggen18-Apr-09 6:51 
AnswerRe: Refreshing the UI during a long process using VB.NET 3.5 without Application.DoEvents - believe me Ive tried! Pin
Luc Pattyn18-Apr-09 7:15
sitebuilderLuc Pattyn18-Apr-09 7:15 
AnswerRe: Refreshing the UI during a long process using VB.NET 3.5 without Application.DoEvents - believe me Ive tried! Pin
Luc Pattyn18-Apr-09 7:22
sitebuilderLuc Pattyn18-Apr-09 7:22 
QuestionMouse-event Improvement Pin
User 584223717-Apr-09 23:33
User 584223717-Apr-09 23:33 
AnswerRe: Mouse-event Improvement Pin
Eddy Vluggen18-Apr-09 0:24
professionalEddy Vluggen18-Apr-09 0:24 
GeneralRe: Mouse-event Improvement Pin
User 584223718-Apr-09 1:24
User 584223718-Apr-09 1:24 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.