Programming with Reflection

image\rwnprg32.gif SetCommandProfile method

 

Syntax object.SetCommandProfile CommandName, EnableFlag

 

Description

Specifies whether a particular method can be executed. (Use the GetCommandProfile method to determine if a command is disabled.) Disabling a method not only prevents you from using it; it also prevents you from performing the equivalent action in Reflection. For example, disabling the OpenSettings method also disables the Open command on Reflection's File menu.

Arguments

CommandName Argument type: String
Specifies a Reflection method. Use the Keyword Index link below to see a list of methods.

EnableFlag Argument type: Enumeration
Specifies whether the command can be executed. The values are:

 rcEnable

 Allows execution of the command.

 rcDisable

 Prevents execution of the command.

 rcDefault

 If the command is, by default, executable, then this value is equivalent to rcEnable. If the command is, by default, not executable, then this value is equivalent to rcDisable.

Notes

· To control whether or not a user can exit Reflection, use Exit (rather than Quit) for the CommandName argument. For example, the following statement disables all attempts to exit Reflection (including those made using the Quit method):

 Session.SetCommandProfile "Exit", rcDisable

 

image\jump.gif Example

image\jump.gif Keyword Index

image\popup.gif Related Topics

image\popup.gif Reflection products that use this command