private void FormSet()

{

  if (this.WindowState == FormWindowState.Maximized)
      {       
         this.WindowState = FormWindowState.Normal;
      }
      else
      {
         this.FormBorderStyle. = FormBorderStyle.None;
         this.MaximumSize = new Size(Screen.PrimaryScreen.WorkingArea.Width, Screen.PrimaryScreen.WorkingArea.Height);
         this.WindowState = FormWindowState.Maximized;
      }

}

//FormBorderStyle.None;主要是设置无标题栏显示!

相关文章: