熱點推薦:
您现在的位置: 電腦知識網 >> 編程 >> .NET編程 >> 正文

C#獲取屏幕分辨率

2022-06-13   來源: .NET編程 

  using SystemWindowsForms;

  獲取屏幕分辨率

  int SH = ScreenPrimaryScreenBoundsHeight;

  int SW = ScreenPrimaryScreenBoundsWidth;

  獲取窗口居中Top和Left

  int thisH=;

  int thisW=;

  int SH = (ScreenPrimaryScreenBoundsHeight thisH) / ;

  int SW = (ScreenPrimaryScreenBoundsWidth thisW) / ;


From:http://tw.wingwit.com/Article/program/net/201311/11952.html
    推薦文章
    Copyright © 2005-2022 電腦知識網 Computer Knowledge   All rights reserved.