vb如何获取屏幕分辨率
我用的是vs2010,想获得屏幕分辨率,然后改变窗体大小
在网上搜到的
Dim x As Integer, y As Integer
x = Screen.Width / Screen.TwipsPerPixelX
y = Screen.Height / Screen.TwipsPerPixelY
不能用 vb 2010 获取屏幕分辨率
[解决办法]
Dim ScreenArea As Rectangle = System.Windows.Forms.Screen.GetWorkingArea(Me)
Me.Size = New System.Drawing.Size(ScreenArea.Width, ScreenArea.Height)
Dim desktopSize As Size = System.Windows.Forms.SystemInformation.PrimaryMonitorSize
Dim height As Integer = desktopSize.Height
Dim width As Integer = desktopSize.Width