react创建一个pc端:在VB中测试屏幕分辨率的控件

来源:百度文库 编辑:神马品牌网 时间:2024/04/28 16:16:43

不需要控件,两种方法实现

Private Declare Function GetSystemMetrics Lib "user32" (ByVal nIndex As Long) As Long

Private Sub Command1_Click()
With Screen
Me.Print .Width \ 15
Me.Print .Height \ 15
End With
End Sub

Private Sub Form_Load()
Me.AutoRedraw = True
Me.Print "宽:" + Str$(GetSystemMetrics(0))
Me.Print "高:" + Str$(GetSystemMetrics(1))
End Sub