Disable resizing of a Windows Forms form

后端 未结 5 675
耶瑟儿~
耶瑟儿~ 2020-12-07 10:27

How do I turn off the user\'s ability to resize a Windows Forms form?

I\'m having it resize itself on a click.

5条回答
  •  星月不相逢
    2020-12-07 11:17

    More precisely, add the code below to the private void InitializeComponent() method of the Form class:

    this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
    

提交回复
热议问题