转自 http://hi.baidu.com/shirley_cst/item/a55c290c8aa2ee2ca0312da3

 

示例代码如下所示。

double x = SystemParameters.WorkArea.Width;//得到屏幕工作区域宽度
double y = SystemParameters.WorkArea.Height;//得到屏幕工作区域高度
double x1= SystemParameters.PrimaryScreenWidth;//得到屏幕整体宽度
double y1 = SystemParameters.PrimaryScreenHeight;//得到屏幕整体高度
this.Width = x1;//设置窗体宽度
this.Height = y1;//设置窗体高度

 

转自 http://hi.baidu.com/shirley_cst/item/a55c290c8aa2ee2ca0312da3

相关文章:

  • 2021-12-06
  • 2022-12-23
  • 2021-09-16
  • 2022-12-23
  • 2022-02-08
  • 2021-11-11
  • 2021-06-10
猜你喜欢
  • 2022-12-23
  • 2021-07-17
  • 2022-12-23
  • 2021-11-05
  • 2022-12-23
  • 2022-12-23
  • 2022-02-03
相关资源
相似解决方案