300字范文,内容丰富有趣,生活中的好帮手!
300字范文 > C#获取屏幕分辨率(大小)

C#获取屏幕分辨率(大小)

时间:2024-07-02 18:50:52

相关推荐

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;

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。