Cancel A WinForm Minimize?

前端 未结 4 864
名媛妹妹
名媛妹妹 2021-01-03 03:06

I have a winform with the minimizeMaximizeClose buttons disabled, but still if someone presses it in the task bar, it will minimize. I want to prevent this from happening.

4条回答
  •  暖寄归人
    2021-01-03 03:27

    you can simply remove the minimize button from the window:

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

                this.MinimizeBox = false;
    

提交回复
热议问题