private void 新建_Load(object sender, EventArgs e) { int DeskWidth = Screen.PrimaryScreen.WorkingArea.Width; int DeskHeight = Screen.PrimaryScreen.WorkingArea.Height; this.Width = Convert.ToInt32(DeskWidth * 0.6); this.Height = Convert.ToInt32(DeskHeight * 0.6); this.StartPosition = FormStartPosition.CenterParent; }
设置的新建窗体是系统屏幕的0.6倍