Anda di halaman 1dari 1

'32-bit API declaration

Declare Function GetSystemMetrics Lib "user32" _

(ByVal nIndex As Long) As Long

Public Const SM_CXSCREEN = 0

Public Const SM_CYSCREEN = 1

Sub DisplayVideoInfo()

vidWidth = GetSystemMetrics(SM_CXSCREEN)

vidHeight = GetSystemMetrics(SM_CYSCREEN)

If vidWidth = 1024 And vidHeight = 768 Then

Exit Sub

Else

Ans = MsgBox("The Current Video mode is:" & vidWidth & " X " & vidHeight & vbCrLf _

& "S.T.A.R.S. is designed to be viewed at 1024 X 768" & vbCrLf _

& "Please goto Start-->Control Panel-->Display-->Settings" & vbCrLf _

& "and adjust your screen area accordingly." _

, vbCritical, "Insufficient Video Settings")

End If

End Sub