第一行:int w = System.Windows.Forms.SystemInformation.WorkingArea.Width; 第二行:int h = System.Windows.Forms.SystemInformation.WorkingArea.Height; 第三行:this.Location = new Point(w/2-250,h/2-180);
第一行:代碼獲取計算機屏幕寬度
第二行:代碼獲取計算機屏幕高度
第三行:設置主窗體顯示在計算機屏幕的位置
此種方法是最靠譜的方法,具體位置大家自己調整
