VERSION 5.00
Object = "{0D452EE1-E08F-101A-852E-02608C4D0BB4}#2.0#0"; "FM20.DLL"
Begin VB.Form frmSRTest 
   BorderStyle     =   4  'Fixed ToolWindow
   Caption         =   "Test Speech Recognition"
   ClientHeight    =   2955
   ClientLeft      =   5235
   ClientTop       =   3150
   ClientWidth     =   2400
   Icon            =   "frmSRTest.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   2955
   ScaleWidth      =   2400
   Begin VB.CommandButton Command2 
      Caption         =   "Help"
      Height          =   375
      Left            =   1200
      TabIndex        =   4
      ToolTipText     =   "Speech recognition help"
      Top             =   2400
      Width           =   975
   End
   Begin VB.CommandButton Command1 
      Caption         =   "OK"
      Height          =   375
      Left            =   120
      TabIndex        =   3
      Top             =   2400
      Width           =   975
   End
   Begin VB.TextBox txtSpoken 
      Height          =   1335
      Left            =   480
      Locked          =   -1  'True
      MultiLine       =   -1  'True
      ScrollBars      =   2  'Vertical
      TabIndex        =   1
      ToolTipText     =   "After you click the Test button, the words recognized will appear in here"
      Top             =   360
      Width           =   1455
   End
   Begin VB.Label Label18 
      Alignment       =   2  'Center
      Caption         =   "Spoken Text:"
      Height          =   255
      Left            =   600
      TabIndex        =   0
      Top             =   120
      Width           =   1215
   End
   Begin MSForms.ToggleButton ToggleButton1 
      Height          =   375
      Left            =   600
      TabIndex        =   2
      ToolTipText     =   $"frmSRTest.frx":08CA
      Top             =   1800
      Width           =   1215
      BackColor       =   -2147483633
      ForeColor       =   -2147483630
      DisplayStyle    =   6
      Size            =   "2143;661"
      Value           =   "0"
      Caption         =   "Test (Listen)"
      FontHeight      =   165
      FontCharSet     =   0
      FontPitchAndFamily=   2
      ParagraphAlign  =   3
   End
End
Attribute VB_Name = "frmSRTest"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'Virtual Hypnotist
'©2003-2008 FollowTheWatch Software
'http://vhypno.sourceforge.net
'http://sourceforge.net/projects/vhypno
'Contact - followthewatch55@yahoo.com

'This program is free software; you can redistribute it and/or
'modify it under the terms of the GNU General Public License
'as published by the Free Software Foundation; either version 2
'of the License, or (at your option) any later version.

'This program is distributed in the hope that it will be useful,
'but WITHOUT ANY WARRANTY; without even the implied warranty of
'MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
'GNU General Public License for more details.

'You should have received a copy of the GNU General Public License
'along with this program; if not, write to the Free Software
'Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.

Private WithEvents VDict1 As Vdict
Attribute VDict1.VB_VarHelpID = -1
Option Explicit

Private Sub Command1_Click()
Unload Me
End Sub

Private Sub Command2_Click()
If ExceptionHandlers = True Then On Error GoTo ErrorHandler

Shell "hh " + App.path + "\vh.chm::/speechrec.html", vbNormalFocus
Exit Sub

ErrorHandler:
err.Source = "Speech Recognition Box"
   Call ErrorReport("An error occurred while loading Windows HTML Help.", vbExclamation)
  
End Sub

Private Sub Form_Load()
Me.Left = (ScreenX / 2) - (Me.Width / 2)
Me.top = (ScreenY / 2) - (Me.Height / 2)
Set VDict1 = New Vdict
End Sub

Private Sub Form_Unload(Cancel As Integer)
Set VDict1 = Nothing
End Sub

Private Sub ToggleButton1_Click()
On Error GoTo DictError
If ToggleButton1.value = True Then VDict1.Activate
If ToggleButton1.value = False Then VDict1.Deactivate
Exit Sub
DictError:
err.Source = "Speech Recognition Box"
Call ErrorReport("Speech Recognition Error. Make sure the speech recognition package (included in the Speech System package) is installed properly.", vbExclamation)
End Sub

Private Sub Vdict1_PhraseFinish(ByVal flags As Long, ByVal phrase As String)
txtSpoken.Text = txtSpoken.Text + " " + phrase
VoiceResult = phrase
End Sub

