RAD Studio |  |

Responding to a Mouse-down Action
See Also
Collapse All

Whenever the user presses a button on the mouse, an OnMouseDown event goes to the object the pointer is over. The object can then respond to the event.

To respond to a mouse-down action, attach an event handler to the OnMouseDown event.

The Code editor generates an empty handler for a mouse-down event on the form:

Copy Code

    procedure TForm1.FormMouseDown(Sender: TObject; Button: TMouseButton;
    Shift: TShiftState; X, Y: Integer);
    begin
    end;

Copy Code

    void __fastcall TForm1::FormMouseDown(TObject *Sender, TMouseButton Button,
      TShiftState Shift, int X, int Y)
    {
    }

See Also

What's in a Mouse Event

Responding to a Mouse-up Action

Responding to a Mouse Move

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!