IT Knowledge
Wednesday, May 30, 2012
Restore MDIform full screen except task bar
ถ้าไม่ต้องการให้ restore MDIform เป็น FormWindowState.Normal ขนาดหน้าจอตอนออกแบบ แต่ต้องการให้เป็นขนาด maximize ตลอดเวลาเมื่อกดปุ่ม restore
เพิ่ม code ดังนี้
private void MDIMain_Resize(object sender, EventArgs e)
{
this.FormBorderStyle = FormBorderStyle.Sizable;
this.Width = Screen.PrimaryScreen.Bounds.Width;
this.Height = Screen.PrimaryScreen.WorkingArea.Height;
}
No comments:
Post a Comment
‹
›
Home
View web version
No comments:
Post a Comment