C#Winform获取屏幕大小

两种方法:

1.

Rectangle rect = Screen.GetWorkingArea(this);
int width = rect.Width;
int height = rect.Height;

 

2.

Rectangle rect = System.Windows.Forms.SystemInformation.VirtualScreen;

int width = rect.Width;
int height = rect.Height;

posted @ 2014-03-02 10:32  Vincent.Dr  阅读(342)  评论(0编辑  收藏  举报