第一行: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);
第一行:代码获取计算机屏幕宽度
第二行:代码获取计算机屏幕高度
第三行:设置主窗体显示在计算机屏幕的位置
此种方法是最靠谱的方法,具体位置大家自己调整