MouseDown and MouseUp in FM20 controls

MouseDown and MouseUp in VBA (fm20 controls) are different from those in VB6
This is a post to describe parameters passed into those two events to detect what keys were pressed.

Public
Tested
My Own Work
Private Sub object_MouseDown( ByVal Button As fmButton, ByVal Shift As fmShiftState, ByVal X As Single, ByVal Y As Single)
Private Sub object_MouseUp( ByVal Button As fmButton, ByVal Shift As fmShiftState, ByVal X As Single, ByVal Y As Single)

Button is:
 fmButtonLeft 1 The left button was pressed.
 fmButtonRight 2 The right button was pressed.
 fmButtonMiddle 4 The middle button was pressed.
Shift is:
 1 SHIFT was pressed.
 2 CTRL was pressed.
 3 SHIFT and CTRL were pressed.
 4 ALT was pressed.
 5 ALT and SHIFT were pressed.
 6 ALT and CTRL were pressed.
 7 ALT, SHIFT, and CTRL were pressed.
fmShiftMask 1 Mask to detect SHIFT.
fmCtrlMask 2 Mask to detect CTRL.
fmAltMask 4 Mask to detect ALT.

Views 1043 Downloads 412

VBA Learning Materials
ANmarAmdeen
633
Attachments
Revisions

v1.0