![]() Example |
![]() ![]() ![]() |
acAppEvents component.
|
type
|
TacAppMouseEvent = procedure(Sender: TObject; Button: TMouseButton; Shift: TShiftState; ScreenPoint: TPoint; WindowHandle: hWnd; HitTestCode: Integer) of object;
|
|
property OnAppMouseDown: TacAppMouseEvent;
|
The OnAppMouseDown event occurs when the user presses a mouse button in ANY window on ANY control within entire application. Use the OnAppMouseDown to handle all mouse clicks within any control of your program.
|
|
The coordinates where user presses a mouse button returned by ScreenPoint parameter (yes, this point in screen coordinates. Check out an example to see how to convert the screen coordinates to coordinates of local control). Window handle of control returned by WindowHandle parameter.
|
Button | Determines the mouse button. Possible return values is mbLeft for left mouse button, mbRight for right and mbMiddle if middle mouse button pressed;
|
Shift | Determines the current state of the control keys Ctrl, Shift and Alt.
|
ScreenPoint | The X and Y screen coordinates where user pressed a mouse button;
|
WindowHandle | The window handle of control where user pressed a mouse button.
|
HitTestCode | The code which identifies the hot sport of control if user pressed a mouse button outside of control's client area. Check out WM_NCHITTEST message in the Win32 API reference for more details.
|
OnAppMouseUp and OnAppMouseMove events.
|