C#: Get complete desktop size?

前端 未结 9 2137
梦谈多话
梦谈多话 2020-11-27 16:40

How do I find out the size of the entire desktop? Not the \"working area\" and not the \"screen resolution\", both of which refer to only o

9条回答
  •  不知归路
    2020-11-27 16:53

    You have two options:

    1. PresentationFramework.dll

      SystemParameters.VirtualScreenWidth   
      SystemParameters.VirtualScreenHeight
      
    2. System.Windows.Forms.dll

      SystemInformation.VirtualScreen.Width   
      SystemInformation.VirtualScreen.Height
      

    Use the first option if you developing a WPF application.

提交回复
热议问题