private void Form1_Load(object sender, EventArgs e)
{
int DeskWidth = Screen.PrimaryScreen.WorkingArea.Width; //PrimaryScreen為取得主顯示器,WorkingArea可取得顯示器的工作區(不包含工作列…等)
int DeskHeight = Screen.PrimaryScreen.WorkingArea.Height;
this.Width = Convert.ToInt32(DeskWidth * 0.8);
this.Height = Convert.ToInt32(DeskHeight * 0.8);
}
沒有留言:
張貼留言