Syntax
CancelButton HorizPos, VertPos, Width, Height [, .Identifier]
Remarks
Creates a Cancel button in a custom dialog box. A user chooses the Cancel button to close the dialog box without taking any action.
Argument | Explanation |
HorizPos, VertPos | The horizontal and vertical distance of the upper-left corner of the Cancel button from the upper-left corner of the dialog box, in increments of 1/8 and 1/12 of the System font (Windows) or the dialog font (Macintosh). |
Width, Height | The width and height of the Cancel button, in increments of 1/8 and 1/12 of the System font (Windows) or the dialog font (Macintosh). |
.Identifier | An optional identifier used by statements in a dialog function that act on the Cancel button, such as DlgEnable and DlgVisible. If omitted, "Cancel" is the default identifier. |
If you use the Dialog statement to display the dialog box and the user chooses the Cancel button, WordBasic generates an error, which you can trap with On Error.
If you use the Dialog() function to display the dialog box and the user chooses the Cancel button, the function returns 0 (zero) rather than generating an error.
To see an example of CancelButton in a dialog box definition, see Begin Dialog¼End Dialog.
See Also
Begin Dialog¼End Dialog, Dialog, Err, Error, OKButton, On Error, PushButton