(1)如何構造全屏窗體
this.WindowState = FormWindowState.Maximized;
this.FormBorderStyle = FormBorderStyle.None;
this.ControlBox = false;
this.Menu = null;
(2)如何将一個窗體放在螢幕中央?
要顯示一個非全屏窗體,請確定窗體的 FormBorderStyle 屬性設定為 FormBorderStyle.None。要使窗體位于中央,請将以下代碼添加到窗體的 FormLoad 事件處理程式中:将 FormBorderStyle 設定為 FormBorderStyle.None,然後
Rectangle screen = Screen.PrimaryScreen.Bounds;
this.Location = new Point((screen.Width - this.Width) / 2,
(screen.Height - this.Height ) / 2);