MouseDown Event - Flat Controls

Applies to:  Panel Control, HotButton Control, DirectionalButton Control
See also:  Click event, MouseUp event, Event Index

Occurs when a mouse button is pressed whilst the mouse pointer is within a Panel, HotButton, or DirectionalButton control. 

Syntax:

Private Sub object_MouseDown(ByVal Button As MouseButtonConstants, ByVal Shift As Boolean, ByVal Control As Boolean, ByVal x As Long, ByVal y As Long)

The MouseDown event syntax has these parts:

Part Description
object The name of an object in the Applies to list.
Button A value indicating which button was pressed.  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 pressed, relative to the top-left corner of the control.
y The y coordinate (in pixels) of the mouse pointer at the time it was pressed, relative to the top-left corner of the control.

 

Home

Copyright and Disclaimer