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

Moving a borderless from.

Status
Not open for further replies.

vacunita

Programmer
Aug 2, 2001
9,166
MX
I'm trying to drag a form that has the borderstyle property set to none. how can i accomplish this? any ideas would be apreciated.

thanx
 
You could intercept the WM_NCHITTEST message.
To do so, put this into your form's declaration.

procedure WMNCHitTest(var M: TWMNCHitTest); message WM_NCHitTest;

and this in the implementation part...

procedure TForm1.WMNCHitTest(var M: TWMNCHitTest);
begin inherited;
{if the mouse clicked on the form}
if (M.Result = htClient) then
M.Result := htCaption;
{make windows think that mouse has been
clicked on caption}
end;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top