object.MenuCreate(applicationName as String, state as String, languageID as Integer, dialect as String, flags as Long)
Creates a new set of voice commands for the given application and state. This method returns a voice-menu object.
· Example:
Dim VMenu As Object
.
.
.
Set Vmenu = Vcmd.MenuCreate("My Application", "MyMenu",
1033&, "", vcmdmc_CREATE_ALWAYS)
object
Voice-command object.
applicationName
Name of the application — for example, "Microsoft Word". The application name must be unique among all applications registered to use voice commands on the user's system.
state
Unique name of the application state in which the voice command set is valid. An application state usually corresponds to an active window or dialog box — for example, "Main Window" or "Set Font Dialog".
languageID
Language identifier as specified for Win32. The first 10 bits indicate the primary language, such as English, French, Spanish, and so forth. The last 6 bits indicate the sublanguage, which is essentially a locale setting. For example, Portuguese has two sublanguages, Brazilian and Standard. For a list of primary and sublanguage identifiers, see the documentation for the MAKELANGID macro in the Win32 SDK.
dialect
Dialect specific to the language — for example, "Texas" or "New York City". The dialect parameter can be "Standard" (or its localized equivalent) for the standard dialect used by the television and radio news media.
flags
Flag that indicates how to create the menu. It can be one of these values:
Value | Description |
vcmdmc_CREATE_NEW | Creates an empty menu with the given name. If a menu by that name already exists in the voice-command database, the method fails. The new menu is stored in the database when the voice-menu object is released. |
vcmdmc_CREATE_ALWAYS | Creates an empty menu with the given name. If a menu by that name already exists in the voice-command database, it is erased. The new menu is stored in the database when the voice-menu object is released. |
vcmdmc_CREATE_TEMP | Creates an empty menu with the given name. If a menu by that name already exists in the voice-command database, the method fails. The new menu is temporary and is discarded when the voice-menu object is released. |
vcmdmc_OPEN_ALWAYS | Opens an existing menu with the given name. If the menu does not exist, the method creates a new, empty menu. The new menu is stored in the database when the voice-menu object is released. |
vcmdmc_OPEN_EXISTING | Opens an existing menu. If the menu does not exist, the method fails. |