AllowCommands Method
Description
Add or remove commands from the menu.
To find the ACom equivalent for a menu command, turn on the Developer Control Bar and select the command. The ACom equivalent will be displayed in the Developer Control Bar.
Syntax
Visual Basic |
---|
Public Function AllowCommands( _ ByVal flag As Integer, _ ByVal listcom As String _ ) As Integer |
Parameters
- flag
-
SIS_COM_ALL
allow all commands. SIS_COM_ADD
add the command(s) specified in listcom. SIS_COM_REMOVE remove the command(s) specified in listcom. SIS_COM_NONE disallow all commands. - listcom
- a list of commands separated by space, comma, tab, or newline characters.
Remarks
To restrict user-access to just a few commands, you can remove all commands using SIS_COM_NONE and then use SIS_COM_ADD to add back the allowed commands.
TIP: Commands removed in this way disappear from the menu but can still be run using other API methods.
Available: D OD OM OV
Groups:
Example
sis.AllowCommands (SIS_COM_REMOVE, "AComLayers, AComCopy, AComPaste")
removes the Overlays, Copy, and Paste commands from the main and local menus