Uses
Windows;type
TForm1 = class(TForm)
protected
procedure WMNCHitTest(var M: TWMNCHitTest); message wm_NCHitTest;
end;var
Form1: TForm1;implementationprocedure TForm1.WMNCHitTest(var M: TWMNCHitTest);
begin
inherited
if M.Result = htClient then
M.Result := htCaption;
end;
Windows;type
TForm1 = class(TForm)
protected
procedure WMNCHitTest(var M: TWMNCHitTest); message wm_NCHitTest;
end;var
Form1: TForm1;implementationprocedure TForm1.WMNCHitTest(var M: TWMNCHitTest);
begin
inherited
if M.Result = htClient then
M.Result := htCaption;
end;
不過我提醒一下。
以後發貼前先search一下吧。
procedure TForm1.FormMouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
ReleaseCapture;
Form1.perform(WM_SysCommand,$F012,0);
end;