無邊界窗體的移動窗体 procedure FormCreate(Sender: TObject); private procedure AppMessage(var Msg:TMsg);message WM_LButtonDown; { Private declarations } public { Public declarations } end;
var Form1: TForm1;
implementation
{$R *.DFM}
procedure TForm1.AppMessage(var Msg:TMsg); begin SendMessage(Handle,WM_NCLButtonDown,HTCaption,GetMessagePos); end;
procedure TForm1.FormCreate(Sender: TObject); begin SetWindowLong(Handle,GWL_STYLE, GetWindowLong(Handle,GWL_STYLE) AND NOT WS_CAPTION); ClientHeight:=Height; end;
----------------------------------------------