Enables or disables a specified event from triggering.
[in] Specifies the
event that you want to cease receiving notifications for.
whether to enable or disable the event. True(-1) disable the event.
False(0) enable the event.
If the method succeeds, the return value will be Success. If the method does not succeed, the return value will be GeneralFailure. If eventName is bad or does not exist, the return value will be InvalidArgument.
All events exposed by the Process Analyst can be enabled or disabled. This method is particularly useful to minimize the likelihood of recursive behavior of functions that generate the same event that you are trying to handle.
This example assumes there is a valid Process Analyst object to be passed into the example methods.
Sub Example(analyst As Object)
analyst.FreezeEvent "HorizontalAxisChanged" True
FUNCTION Example(OBJECT hAnalyst)
_ObjectCallMethod(hAnalyst, "FreezeEvent","HorizontalAxisChanged", -1);