c#中有类似delphi中screen之类的用来获取屏幕宽度的类或变量吗

解决方案 »

  1.   

    用api吧。网上有现成的代码。
      

  2.   

    找一下 System.Windows.Forms.Screen 里边有没有
      

  3.   

    Dim pt As Point
    Dim rect As Rectanglerect = System.Windows.Forms.Screen.GetBounds(pt)
      

  4.   

    怎么实现界面上相应的控件在不同宽度的显示器上能作相应的大小调整在Form的ReSize事件里应该可以调整的吧.
      

  5.   

    System.Windows.Forms.Screen.GetBounds();
      

  6.   

    System.Windows.Forms.Screen.PrimaryScreen.Bounds.Width//显示器的宽度
    System.Windows.Forms.Screen.PrimaryScreen.Bounds.Height//显示器高度