procedure TForm1.CreateParams(var Params:TCreateParams);
begin
inherited CreateParams(Params);
Params.Style := WS_SIZEBOX or
WS_POPUP or
WS_BORDER;
end;
*******************
procedure TForm1.FormCreate(Sender: TObject);
begin
borderstyle:=bsSizeable;
setwindowlong(handle,gwl_style,getwindowlong(handle,gwl_style) and not ws_caption);
clientheight:=height;
end;
拖动
在想要拖动的部件的mousemove事件, 即可
procedure TForm1.pnlMouseMove(Sender: TObject;
Shift: TShiftState; X, Y: Integer);
begin
ReleaseCapture;
Perform(WM_SYSCOMMAND,$f012,0);
end;