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

来源:互联网 发布:函数空间的格拉姆矩阵 编辑:程序博客网 时间:2024/06/07 16:15
            获取屏幕分辨率
            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;
0 0
原创粉丝点击