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;
posted @ 2009-08-20 15:50  栢芯  阅读(1287)  评论(0编辑  收藏  举报