Hello. The following program does not work for me:
1. We load components of Microsoft Agent and disconnect a computer from
Internet.
2. In VB .NET we create the project, appears Form1.
3. On Form1 we place Microsoft Agent Control 2.0 with name AxAgent1.
4. We double-click on Form1 and in the appeared procedure write the
following code:
Dim myGenie As AgentObjects.IAgentCtlCharacterEx
Const DATAPATH_1 As String = "genie.acs"
Private Sub Form1_Load(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles MyBase.Load
AxAgent1.Characters.Load("Genie", DATAPATH_1)
myGenie = AxAgent1.Characters("Genie")
myGenie.LanguageID = &H409S
myGenie.MoveTo(CShort(Me.Location.X + 750), _
CShort(Me.Location.Y + 250))
myGenie.Show()
End Sub
5. In a window of the editor of Form1.vb and in window Class Name, we choose
AxAgent1, in window Method Name choose Command and in the appeared procedure
write the following code:
Private Sub AxAgent1_Command(ByVal sender As Object, _
ByVal e As AxAgentObjects._AgentEvents_CommandEvent) _
Handles AxAgent1.Command
Dim myCommand As AgentObjects.IAgentCtlUserInput = _
CType(e.userInput, AgentObjects.IAgentCtlUserInput)
If myCommand.Name = "Hide" Then
myGenie.Hide()
End If
End Sub
However at start of this program, after pressing key Scroll Lock and
pronouncing in a microphone of command "Hide", Genie does not disappear and
does not react to my commands a voice.
In known example "Peedy's Pizza Palace" the parrot reacts to my commands
from a microphone, and therefore "Speech recognition engines" and a
microphone at me work.
Inform, please, where in my code a mistake, that character carried out my
commands a voice?
Beforehand thanks for your answer. Best regards, Dr. V.A. Zharkov. Moscow,
Russia.