Disable form resizing in delphi

后端 未结 3 1444
渐次进展
渐次进展 2021-02-18 22:49

Is there any way to stop the user resizing the form?

Currently I am using:

When form size changed....

MainForm.Height := 761;
MainForm.Width := 7         


        
3条回答
  •  粉色の甜心
    2021-02-18 23:14

    you can added code at Events "OnCanResize":

    Resize := False;
    

    Example:

    procedure TF_NameForm.FormCanResize(Sender: TObject; var NewWidth,
      NewHeight: Integer; var Resize: Boolean);
    begin
      Resize := False;
    end;
    

提交回复
热议问题