You are reading help file online using chmlib.com
|
Interface: ISpeechRecoGrammar
The State property gets and sets the operational status of the speech grammar.
The status consists of a SpeechGrammarState constant; its three states can be summarized as enabled, disabled, and exclusive.
Set: | ISpeechRecoGrammar.State = SpeechGrammarState |
Get: | SpeechGrammarState = ISpeechRecoGrammar.State |
The following code snippet demonstrates the use of the State property. The grammar is disabled while the CmdLoadFromFile method loads the grammar, and enabled when the load has completed.
Dim C As SpeechLib.SpSharedRecoContext
Dim G As SpeechLib.ISpeechRecoGrammar
Set C = New SpSharedRecoContext
Set G = C.CreateGrammar()
'
'
'
G.State = SGSDisabled 'Disable grammar while loading
G.CmdLoadFromFile ("c:\sol.xml")
G.State = SGSEnabled 'Re-enable when done loading
You are reading help file online using chmlib.com
|