ClickHandler |
Description
When event handling (a.k.a. CallBack) is enabled, the ClickHandler procedure is used to sink the events. That is, whenever an event occurs, ClickHandler is called with the name of the form and control/event information. |
Syntax
Sub sPrefixClickHandler ( sForm, sControl )'Your code should go here ! End Sub |
Parameters
Part |
Description |
|
sPrefix |
To enable event handling, you should have passed a second parameter to the Wscript.CreateObject method you use to connect to the WshDialog.Kit COM automation object. sPrefix must be identical to this second parameter. |
|
sForm |
This parameter receives the name of the form on which the event occured |
|
sControl |
This parameter may contain one of the following values (more information can be found in the Events handled topic) |
|
Event type |
sControl value |
|
Form level |
Special keywords like "*ACTIVATE", "*CLOSE" and "*F1" through "*F12" |
|
Control level |
The name of the control (for controls that handle only one event and for the default event of controls that handle multiple events) |
|
Control level |
A compound value, consisting of the name of the control, followed by the event name and (optional) additional data. The elements are separated by null characters |
Example
Option Explicit Set oDlg = Wscript.CreateObject("WshDialog.Kit", "oDlg_") 'Code to add a form and controls and to show the form should go here: '…. '----------------------------------------------------------------------------------------------------------------- |