如何获取屏幕尺寸大小,单位是毫米?谢谢

解决方案 »

  1.   

    int Width = Screen.PrimaryScreen.Bounds.Width;
    int Height = Screen.PrimaryScreen.Bounds.Height;
      

  2.   

    可以设置屏幕的度量单位的,你画矩形是可以指定度量单位的,就如bobshen那样可以指定为毫米为度量单位的,这样你画出来的矩形就是以毫秒为单位的,具体实现如下: // Create a rectangle.
        Rectangle rectangle1 = new Rectangle(0, 0,1000, 1000);
        // Change the page scale.  
        e.Graphics.PageUnit = GraphicsUnit.Millimeter;    // Draw the rectangle again.
        e.Graphics.DrawRectangle(Pens.Tomato, rectangle1);
      

  3.   

    我有一点疑问。同样分辨率的像素点,iphone5和一个电脑,像素点相等,这个毫米怎么算?