Tuesday, 15 November 2011
Home »
Tips and Trick Delphi
» Moving a Form Without the Caption / Title Bar ( Delphi )
Moving a Form Without the Caption / Title Bar ( Delphi )
To Share | Tuesday, 15 November 2011
How to move a form without dragging the caption bar.
Place the following code in Delphi visual component that has event onmousedown:
ReleaseCapture;
SendMessage (Form1.Handle, WM_SYSCOMMAND, $ F012, 0);
Example of implementation:
TForm1.FormMouseDown procedure (Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
ReleaseCapture;
SendMessage (Form1.Handle, WM_SYSCOMMAND, $ F012, 0);
end;
No comments:
Post a Comment