C# 获取屏幕分辨率
时间:2011-01-11 来源:柳柳英侠
System.Windows.Forms.Screen screen = Screen.PrimaryScreen;
System.Drawing.Rectangle rct = screen.Bounds;
this.label1.Text = rct.Height.ToString();//高度
this.label2.Tex t= rct.Width.ToString();//宽度
WPF:
double height = SystemParameters.PrimaryScreenHeight;
double width = SystemParameters.PrimaryScreenWidth;
相关阅读 更多 +