Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

OnFormMove event 2

Status
Not open for further replies.

Roderich

Programmer
Sep 11, 2001
58
DE
hi,

I want to react to form move action when the user clicks on a form's caption and moves the form.
Unfortunately Delphi doesn't offer an event for this (forms's OnMouseDown is not called when clicking on the caption).

Anybody got an idea how ?

wbR
Roderich
 
Create a procedure under the private headings of your form code with the other procedures like this

procedure FormMove(var Msg: TMessage); message WM_EXITSIZEMOVE;

and then enter the procdure code as you would normally, like this.

procedure TForm1.FormMove(var msg: TMessage);
begin
ShowMessage('Hey look, my forms moving');
end; Arte Et Labore
 
thanks a lot, Eric

actually WM_EXITSIZEMOVE gives me just a message when releasing mouse button after moving, but I found another message WM_MOVING in this group that does the job.

wbr
Roderich
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top