控制dx窗体的大小及位置
2021-04-21 20:25
//控制默认窗体的高度和宽度
this.Height
this.Width
//控制默认窗体的位置
this.Top
this.Left
//设置为默认窗体,最大化窗体,最小化窗体
this.WindowState = FormWindowState.Normal;
this.WindowState = FormWindowState.Minimized;
this.WindowState = FormWindowState.Maximized;
Dome
this.Height = 200;
this.Width = 220;
this.Top = 50;
Rectangle ScreenArea = System.Windows.Forms.Screen.GetBounds(this);
int Woswidth=ScreenArea.Width;
this.Left = Woswidth-230;
this.WindowState = FormWindowState.Normal;