trandang > 02-10-11, 12:22 PM
Noname > 02-10-11, 02:52 PM
Option Explicit
Private Declare Function GetSystemMetrics Lib "user32" (ByVal nIndex As Long) As Long
'Constants for GetSystemMetrics
Const SM_CXSCREEN = 0 ' Width of screen
Const SM_CYSCREEN = 1 ' Height of screen
Sub Get_System_Metrics()
Dim XVal As Long, YVal As Long
' Chieu dai
YVal = GetSystemMetrics(SM_CYSCREEN)
' chieu rong
XVal = GetSystemMetrics(SM_CXSCREEN)
MsgBox "Your Screen Resolution is " & XVal & " by " & YVal
End Sub
trandang > 02-10-11, 11:19 PM