Programming mouse-related events is a common task within most applications.
This is because the mouse is the most common device for user interaction within
a Windows-based user interface.
In particular, the Click event
is possibly the most commonly programmed event
in a VB application. All the mouse events except
MouseMove are directly related to the action
of one of the mouse buttons.
For controls that support
mouse events, the click-related events take
place in the following order:
When the user clicks once over Label and TextBox controls:
1. MouseDown
2. MouseUp
3. Click
When the user clicks once over a CommandButton control:
1. MouseDown
2. Click
3. MouseUp
When the user double-clicks over Label and TextBox controls:
1. MouseDown
2. MouseUp
3. Click
4. DblClick
5. MouseUp
When the user double-clicks over a CommandButton, no DoubleClick event fires
(the CommandButton does not support a DoubleClick event). Instead, the CommandButton
receives (as you might imagine):
1. MouseDown
2. Click
3. MouseUp
4. MouseDown
5. Click
6. MouseUp