Applies to: Subclasser object, PowerForm
control, Panel control, HotButton
control, DirectionalButton
control
See also: ClickChild event, ClickControl
event, Event Index
For the SubClasser and PowerForm controls, the Click event occurs when a mouse button is pressed whilst the mouse pointer is within
the window subclassed by the SubClasser or PowerForm control, and is then released whilst the mouse pointer is within the same window.
For the Panel control, HotButton control, and
DirectionalButton controls,
the Click event occurs when the mouse button is clicked within the opaque region
of the control.
Syntax:
Private Sub object_Click(ByVal Button As MouseButtonConstants, ByVal Shift As Boolean, ByVal Control As Boolean, ByVal x As Long, ByVal y As Long)
The Click event syntax has these parts:
Part |
Description |
object |
The name of an object in the Applies to list. If object is
a SubClasser object, then the object must be declared using WithEvents. |
Button |
A value indicating which button was clicked. Can be any one of the
following values:
- vbLeftButton
- vbMiddleButton
- vbRightButton
|
Shift |
A boolean value indicating the state of the Shift key. A value of
True indicates that one or both Shift keys are down. |
Control |
A boolean value indicating the state of the Control key. A value
of True indicates that one or both Control keys are down |
x |
The x coordinate (in pixels) of the mouse pointer at the time it was
clicked, relative to the top-left corner of the window or control. |
y |
The y coordinate (in pixels) of the mouse pointer at the time it was
clicked, relative to the top-left corner of the window or control. |
|