当前位置:编程学习 > C#/ASP.NET >>

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;

    
补充:软件开发 , C# ,
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,