MouseDown event (Display object)
Occurs when you press a mouse button while the mouse pointer is over a blank area or the wallpaper of a display.
Syntax
Display
_MouseDown
(ByVal
Button
As gfxMouseButtonConstants
, ByVal
Shift
As Integer
, ByVal
X
As Long
, ByVal
Y
As Long
)where
Display
– is the name of a Display object variable that was dimensioned using the WithEvents keyword or the reserved name Display.Button
– is a constant of the type gfxMouseButtonConstants that indicates which button was pressed to cause the event.Shift
– is a parameter of the type Integer that corresponds to the state of the Shift, Ctrl, and Alt keys at the time of the event.X
, Y
– are numbers that indicate the current location of the mouse pointer. If the display is not scaled (i.e. HorizontalScaleFactor = VerticalScaleFactor = 1), these values are in pixels.Remarks
The
Shift
parameter is a bit field whose least significant bits correspond to the Shift (bit 0), Ctrl (bit 1), and Alt (bit 2) keys. These bits correspond to the values 1, 2, and 4, respectively. The value of the parameter indicates which bits are set (that is, which keys are pressed). For example, if Ctrl and Alt are pressed, the value of Shift is 6. Some, all, or none of the keys can be pressed.Provide Feedback