Chapter 1 A-Z Reference
156 IC Scripts VBA Scripting Reference
When IC Script displays a custom dialog box, the user may click on buttons, type text into edit
fields, select items from lists, and perform other actions. When these actions occur, IC Script calls
the dialog function, passing it the action, the name of the control on which the action occurred, and
any other relevant information associated with the action.
The following table describes the different actions sent to dialog functions:
Integer containing the action that called the dialog function.
Integer of extra information associated with
some actions, this parameter is not used.
This action is sent immediately before the dialog box is shown for the
first time. This gives the dialog function a chance to prepare the dialog
box for use. When this action is sent,
contains a zero-
length string, and
The return value from the dialog function is ignored in this case.
Before Showing the Dialog Box
After action 1 is sent, IC Script performs additional processing before
the dialog box is shown. Specifically, it cycles though the dialog box
controls checking for visible picture or picture button controls. For
each visible picture or picture button control, IC Script attempts to load
the associated picture.
In addition to checking picture or picture button controls, IC Script will
automatically hide any control outside the confines of the visible
portion of the dialog box. This prevents the user from tabbing to
controls that cannot be seen. However, it does not prevent you from
showing these controls with the DlgVisible statement in the dialog
This action is sent when:
A button is clicked, such as OK, Cancel, or a push button. In this case,
contains the name of the button.
if an OK button was clicked and 2 if a Cancel button was clicked;
is undefined otherwise.
If the dialog function returns 0 in response to this action, then the
dialog box will be closed. Any other value causes IC Script to continue
A check box's state has been modified. In this case,
contains the name of the check box, and
contains the new
state of the check box (1 if on, 0 if off).
An option button is selected. In this case,
name of the option button that was clicked, and
the index of the option button within the option button group (0-based).
The current selection is changed in a list box, drop list box, or combo
box. In this case,
contains the name of the list box,
combo box, or drop list box, and
contains the index of the
new item (0 is the first item, 1 is the second, and so on).