Share via


Set the VUI form focus

The lifetime of a VuiController instance is bound to that of a VUI form; the VUI form corresponds to a speech-enabled GUI form in your app. If your app allows the user to switch between open speech-enabled forms, you must notify Dragon Medical SpeechKit about changes in the active form to ensure correct operation.

Procedure

On the VuiController, set the AutoFocus property to false. This enables explicit control over the focus via the Focused property and disables the legacy behavior of implicitly activating the VuiController instance whenever Open() or Synchronize() is called.

On the VuiController instance, set the Focused property to true if the form corresponding to the given instance has the focus (for example, the user has started to work in it).

Note

By default, no VuiController instance has the focus. Make sure to activate one to be able to start recording.

Important information

  • It's recommended to tie the VUI controller activation to state transitions of the corresponding speech-enabled forms or windows: set the Focused property on the VuiController instance to true whenever the corresponding window becomes visible or focused.

  • Only one VUI controller can have the focus at any one time. If you activate a VUI controller by setting its Focused property to true, any other currently active VUI controller will be deactivated, i.e. its Focused property will implicitly be set to false. Therefore, it's usually not necessary to explicitly set the Focused property of a VUI controller to false. This might even result in a break in usability because speech recognition isn't operational and the speech bar is hidden if no VUI controller has the focus.

  • Remove focus from the active VUI controller only if your app’s workflow no longer allows the user to dictate into the corresponding speech-enabled form. It's not necessary to clear the VUI controller focus temporarily for any operations performed on the Dragon Medical SpeechKit API; doing so can have a negative effect on usability.

  • It's good practice to create the VuiController instances as soon as your speech-enabled forms are created and destroy them when the forms are no longer needed. All forms must have a dedicated VuiController instance; don't share a VuiController instance between forms. Always use the VUI controller focus functionality to switch to the active form; don't replace the controls in a controller when the user switches forms.

  • The lifetime of a VUI controller is tied to the lifetime of a "speech document" in the Dragon Medical Recognition Service. To make the Dragon Medical Recognition Service aware of document changes you shouldn't reuse the same VUI controller for multiple documents but rather create and activate a new VUI controller and delete the previous one whenever the user starts working on a new document.