«« Site Rescued »»

While the site is still going to move from its current host, a new site will now take its place. More Info.

The new site may have less content, but the core will now remain. And it will now play nicely with phones! Keep an eye on the DelphiDabbler Blog for news.

» Help

How to disable form movement using the mouse

   

This is how to prevent a form from being moved using the mouse.

type
  TForm1 = class(TForm)
  private
    { Private declarations }
    procedure WMNCHitTest(var Message: TWMNCHitTest); message WM_NCHITTEST;
  end;

procedure TForm1.WMNCHitTest(var Message: TWMNCHitTest);
begin
 inherited;
 with Message do
   if Result = HTCAPTION then
     Result := 0;
end;
Author: Dennis LV
Contributor: Dennis LV
Added: 2007-09-20
Last updated: 2007-09-20

« Return to contents »