using System.Windows.Forms;

首先引用上面的命名空间。

然后在代码中获取屏幕信息。如下代码:

   System.Windows.Forms.Screen screen = System.Windows.Forms.Screen.PrimaryScreen; System.Drawing.Rectangle rct = screen.Bounds;
            int width= screen.WorkingArea.Width;

 

相关文章:

  • 2022-01-07
  • 2022-12-23
  • 2022-01-07
  • 2022-01-08
  • 2021-06-15
猜你喜欢
  • 2022-01-11
  • 2022-02-21
  • 2021-11-18
  • 2021-12-06
  • 2021-11-16
  • 2021-09-06
相关资源
相似解决方案