C#获取屏幕分辨率(大小)
生活随笔
收集整理的這篇文章主要介紹了
C#获取屏幕分辨率(大小)
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
using System.Windows.Forms;
??????????? 獲取屏幕分辨率
??????????? int SH = Screen.PrimaryScreen.Bounds.Height;
??????????? int SW = Screen.PrimaryScreen.Bounds.Width;??
??????????? 獲取窗口居中Top和Left
??????????? int thisH=100;
??????????? int thisW=200;
??????????? int SH = (Screen.PrimaryScreen.Bounds.Height - 30 - thisH) / 2;
??????????? int SW = (Screen.PrimaryScreen.Bounds.Width - 10 - thisW) / 2;
??????????? 獲取屏幕分辨率
??????????? int SH = Screen.PrimaryScreen.Bounds.Height;
??????????? int SW = Screen.PrimaryScreen.Bounds.Width;??
??????????? 獲取窗口居中Top和Left
??????????? int thisH=100;
??????????? int thisW=200;
??????????? int SH = (Screen.PrimaryScreen.Bounds.Height - 30 - thisH) / 2;
??????????? int SW = (Screen.PrimaryScreen.Bounds.Width - 10 - thisW) / 2;
轉載于:https://www.cnblogs.com/limshirley/archive/2009/08/20/1550764.html
總結
以上是生活随笔為你收集整理的C#获取屏幕分辨率(大小)的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 【转载】Windwos CE 跨进程内存
- 下一篇: 【Top1】Tudou.com首页网页设