1. 程式人生 > >控制dx窗體的大小及位置

控制dx窗體的大小及位置

for 窗體 window wid bsp ini max 位置 .get

//控制默認窗體的高度和寬度

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;

控制dx窗體的大小及位置