FormWindowState tempWindowState;
private void frmMain_SizeChanged(object sender, EventArgs e)
        {
            if (tempWindowState != FormWindowState.Maximized && this.WindowState == FormWindowState.Maximized)//点击最大化
            {
                tempWindowState = FormWindowState.Maximized;
                this.Text = "普通变为最大化";
                // SetPictureBoxCenter();
            }
            else if (tempWindowState == FormWindowState.Maximized && this.WindowState == FormWindowState.Normal)//窗口由最大化还原为普通
            {
                tempWindowState = FormWindowState.Normal;
                this.Text = "最大化还原为普通";
                //SetPictureBoxCenter();
            }

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-16
猜你喜欢
  • 2022-12-23
  • 2021-12-31
  • 2022-12-23
  • 2022-12-23
  • 2021-07-22
  • 2022-12-23
  • 2021-07-22
相关资源
相似解决方案