得到屏幕分辨率

有个SystemInformation类,用它的VirtualScreen可以得到屏幕的相关信息。

如得到VirtualScreen的宽和高就是屏幕的分辨率。

private void Form1_Load(object sender, EventArgs e)
        {
          int wd=  SystemInformation.VirtualScreen.Width;
          int wh = SystemInformation.VirtualScreen.Height;
          MessageBox.Show(string.Format("{0}X{1}", wd, wh));
          
        }

 

posted on 2012-12-19 15:03  天上星  阅读(189)  评论(0编辑  收藏  举报

导航