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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dragging form

Status
Not open for further replies.

Nephila

Programmer
May 14, 2002
13
ZA
Is it at all possible to reposition (drag) the main form with a panel on that main form. The form's border style is set to bsNone, but i still want the user to be able to move the form around on the screen. Any help???
 
//this should do the trick...

procedure TForm1.MouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
if Button = mbLeft then
begin
ReleaseCapture;
self.Perform(WM_SYSCOMMAND,$F012,1);
end
end;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top