winform窗体最大化、最小化、还原

时间:2024-08-25 08:35:14

//最大化

private void button_maxsize_Click(object sender, EventArgs e)
        {
            this.WindowState = FormWindowState.Maximized;
        }
        //最小化
        private void button_minisize_Click(object sender, EventArgs e)
        {
            this.WindowState = FormWindowState.Minimized;
        }
       //向下还原
        private void button_normal_Click(object sender, EventArgs e)
        {
            this.WindowState = FormWindowState.Normal;
        }