VB判断分辨率 执行命令
假如分辨率是800*600那么程序就打开1.exe如果是1024*768程序就打开2.exe依次类推.请高手赐教...
假如分辨率是800*600那么程序就打开1.exe如果是1024*768程序就打开2.exe依次类推. 请高手赐教
展开
展开全部
不用API:
Width = screen.width/ screen.twipsperPixelX
Height = Screen.Height/Screen.TwipsPerPixelY
api方式:
Declare Function GetSystemMetrics Lib "user32" (ByVal nIndex As Long) As Long
Public Const SM_CXSCREEN = 0
Public Const SM_CYSCREEN = 1
Private Sub Form_Load()
Dim Tmp As String
Tmp = GetSystemMetrics(SM_CXSCREEN) & _
"x" & GetSystemMetrics(SM_CYSCREEN)
MsgBox (Tmp)
End Sub
Width = screen.width/ screen.twipsperPixelX
Height = Screen.Height/Screen.TwipsPerPixelY
api方式:
Declare Function GetSystemMetrics Lib "user32" (ByVal nIndex As Long) As Long
Public Const SM_CXSCREEN = 0
Public Const SM_CYSCREEN = 1
Private Sub Form_Load()
Dim Tmp As String
Tmp = GetSystemMetrics(SM_CXSCREEN) & _
"x" & GetSystemMetrics(SM_CYSCREEN)
MsgBox (Tmp)
End Sub
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询