Important Notice
The pages on this site contain documentation for very old MS-DOS software,
purely for historical purposes.
If you're looking for up-to-date documentation, particularly for programming,
you should not rely on the information found here, as it will be woefully
out of date.
Click Event Details
◄Summary► ◄Details► ◄Example► ◄Contents► ◄Index► ◄Back►
──────────────────────────────────────────────────────────────────────────────
SUB Form_Click ()
SUB ctlname_Click ([Index AS INTEGER])
Usage Notes
■ For a form, the Click event occurs when the user clicks a disabled
control or a blank area of a form using the left-mouse button.
■ For a control, the Click event occurs when the user:
• Clicks a control with the left mouse button
• Selects an item in a combo box or list box, either by pressing the
arrow keys or by clicking the left mouse button
• Presses the Spacebar when a command button or check box has the focus
See: ◄Focus Definition►
• Presses Enter when a form has a command button with its Default
property set to True (-1)
• Presses Esc when a form has a command button with its Cancel property
set to True (-1)
• Presses an access key that has been assigned to a control
See: ◄Access Keys►
• Moves between option buttons in a group using arrow keys or the mouse
■ Typically, you attach a Click event procedure to a command button, menu,
or picture box control to carry out commands.
■ To distinguish between left and right mouse buttons, use the MouseDown
and MouseUp events. See: ◄MouseDown Event► ◄MouseUp Event►
■ You can trigger the Click event in code by:
• Changing the ListIndex property to a new non-negative value
• Setting a command button's Value property to True (-1)
• Setting an option button's Value property to True (-1)
• Changing a check box's Value property
See: ◄ListIndex Property► ◄Value Property►
■ You can use a control's Value property to test for the state of the
control in code.
■ A Click event generated for a form, file list box, list box, label, or
picture box also includes this event ordering: MouseDown, MouseUp,
Click.
■ When a menu title is selected, the associated menu is displayed. Any
code written for the menu title's Click event is executed. It is not
advisable to write menu title Click event code that will cause a Paint
or any other events. A menu title's Click event should only be used to
change property values of lower level menu items.