this.Location = new Point(

   Screen.PrimaryScreen.Bounds.Width/2 - this.Size.Width/2,

   Screen.PrimaryScreen.Bounds.Height/2 - this.Size.Height/2

); 




* 해상도를 가져오는 방법


1. 

Screen.PrimaryScreen.Bounds.Width
Screen.PrimaryScreen.Bounds.Height

 

2.

System.Windows.Forms.SystemInformation.VirtualScreen.Width;

System.Windows.Forms.SystemInformation.VirtualScreen.Height;



출처: http://sdw8001.tistory.com/95

+ Recent posts