Mega Code Archive

 
Categories / Delphi / Forms
 

Prevent a form from moving-resizing

private procedure WMSysCommand(var Msg: TWMSysCommand); message WM_SYSCOMMAND; {...} implementation procedure TForm1.WMSysCommand(var Msg: TWMSysCommand); begin if ((Msg.CmdType and $FFF0) = SC_MOVE) or ((Msg.CmdType and $FFF0) = SC_SIZE) then begin Msg.Result := 0; Exit; end; inherited; end;