Is there a way to programmatically minimize a window

前端 未结 10 550
感动是毒
感动是毒 2021-02-03 17:09

What I\'m doing is I have a full-screen form, with no title bar, and consequently lacks the minimize/maximize/close buttons found in the upper-right hand corner. I\'m wanting to

10条回答
  •  温柔的废话
    2021-02-03 17:40

    private void Form1_KeyPress(object sender, KeyPressEventArgs e)
    {
         if(e.KeyChar == 'm')
             this.WindowState = FormWindowState.Minimized;
    }
    

提交回复
热议问题