I am trying to use MS Speech SDK in Visual Basic. Can you see why this
code doesn't run (on an XP machine)?
The code compiles OK and the form comes up when I run the app but I
don't even get my first print statement (Label1.Text = "Form Loaded").

Option Explicit Off

Imports SpeechLib

Public Class Form1
Public WithEvents RC As SpSharedRecoContext
Public myGrammar, b As ISpeechRecoGrammar

Private Sub Form1_Load()
RC = New SpSharedRecoContext
Label1.Text = "Form Loaded"
myGrammar = RC.CreateGrammar
myGrammar.CmdLoadFromFile("e:\SolApp\sol.xml", SLODynamic)
myGrammar.CmdSetRuleIdState(0, SGDSActive)
Label1.Text = "Grammar Loaded"
End Sub

Private Sub RC_FalseRecognition(ByVal StreamNumber As Long, ByVal
StreamPosition As Object, ByVal Result As SpeechLib.ISpeechRecoResult)
Label1.Text = "(no recognition)"
End Sub

Private Sub RC_Recognition(ByVal StreamNumber As Long, ByVal
StreamPosition As Object, ByVal RecognitionType As
SpeechLib.SpeechRecognitionType, ByVal Result As
SpeechLib.ISpeechRecoResult)
Label1.Text = Result.PhraseInfo.GetText
End Sub


End Class