winform,wpf,winrt获取屏幕分辨率
2014-08-08 14:30
211 查看
winform
当前的屏幕除任务栏外的工作域大小
this.Width = System.Windows.Forms.Screen.PrimaryScreen.WorkingArea.Width;
this.Height = System.Windows.Forms.Screen.PrimaryScreen.WorkingArea.Height;
当前的屏幕包括任务栏的工作域大小
this.Width=System.Windows.Forms.Screen.PrimaryScreen.Bounds.Width;
this.Height=System.Windows.Forms.Screen.PrimaryScreen.Bounds.Height;
任务栏大小
this.Width=System.Windows.Forms.Screen.PrimaryScreen.Bounds.Width-System.Windows.Forms.Screen.PrimaryScreen.WorkingArea.Width;
this.Height=System.Windows.Forms.Screen.PrimaryScreen.Bounds.Height-System.Windows.Forms.Screen.PrimaryScreen.WorkingArea.Height;
winform实现全屏显示
WinForm:
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
this.TopMost = true;
wpf
double width= SystemParameters.PrimaryScreenWidth;
double height = SystemParameters.PrimaryScreenHeight;
winrt
double width = CoreWindow.GetForCurrentThread().Bounds.Width;
double height = CoreWindow.GetForCurrentThread().Bounds.height;
官方的回复:http://social.msdn.microsoft.com/Forums/zh-CN/a376a37b-f7d6-4d05-aa8e-75768e2f12b7/win8?forum=winstoreappzhcn
当前的屏幕除任务栏外的工作域大小
this.Width = System.Windows.Forms.Screen.PrimaryScreen.WorkingArea.Width;
this.Height = System.Windows.Forms.Screen.PrimaryScreen.WorkingArea.Height;
当前的屏幕包括任务栏的工作域大小
this.Width=System.Windows.Forms.Screen.PrimaryScreen.Bounds.Width;
this.Height=System.Windows.Forms.Screen.PrimaryScreen.Bounds.Height;
任务栏大小
this.Width=System.Windows.Forms.Screen.PrimaryScreen.Bounds.Width-System.Windows.Forms.Screen.PrimaryScreen.WorkingArea.Width;
this.Height=System.Windows.Forms.Screen.PrimaryScreen.Bounds.Height-System.Windows.Forms.Screen.PrimaryScreen.WorkingArea.Height;
winform实现全屏显示
WinForm:
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
this.TopMost = true;
wpf
double width= SystemParameters.PrimaryScreenWidth;
double height = SystemParameters.PrimaryScreenHeight;
winrt
double width = CoreWindow.GetForCurrentThread().Bounds.Width;
double height = CoreWindow.GetForCurrentThread().Bounds.height;
官方的回复:http://social.msdn.microsoft.com/Forums/zh-CN/a376a37b-f7d6-4d05-aa8e-75768e2f12b7/win8?forum=winstoreappzhcn
相关文章推荐
- WPF 获取屏幕分辨率(获取最大宽高)
- C# WinForm 获取屏幕分辨率大小
- WPF 获取屏幕长宽(分辨率)
- WPF 获取屏幕长宽(分辨率)
- WPF 获取屏幕分辨率(获取最大宽高)
- WPF 获取屏幕分辨率(获取最大宽高)
- WPF 获取屏幕分辨率
- WPF 获取屏幕分辨率(获取最大宽高)等
- Silverlight获取屏幕分辨率
- Android获取屏幕分辨率及DisplayMetrics简介
- js获取屏幕尺寸、网页可见区域、网页正文、屏幕分辨率
- js获取页面宽度高度及屏幕分辨率
- 关于android如何获取屏幕分辨率的例子
- 获取手机屏幕分辨率
- 获取屏幕硬件分辨率方法
- WPF中获取鼠标相对于屏幕的位置——出自《IT168》
- 获取屏幕分辨率的例子
- java_获取屏幕分辨率
- silverlight获取屏幕分辨率
- asp获取屏幕分辨率