VB Code:
Public Sub ResizeScreenTo1024()
Dim r As Integer
'try to set the screen res here
'get the screen resolution and color depth
originalResolution = GetScreenResolution()
originalDepth = GetAvailableColours()
xOriginalWidth = GetCurrentXSetting
yOriginalWidth = GetCurrentYSetting
'try to change the resolution to 1024 x 768 with 32,24,16,8,4 until success
If (xOriginalWidth < 1024) And (yOriginalWidth < 768) Then
Call ChangeScreenSettings(1024, 768, 32)
If changeSuccessful = False Then
'32 failed, try 24
Call ChangeScreenSettings(1024, 768, 24)
If changeSuccessful = False Then
'24 failed, try 16
Call ChangeScreenSettings(1024, 768, 16)
If changeSuccessful = False Then
'16 failed, try 8
Call ChangeScreenSettings(1024, 768, 8)
If changeSuccessful = False Then
'8 failed, try 4
Call ChangeScreenSettings(1024, 768, 4)
If changeSuccessful = False Then
r = MsgBox("Your computer cannot operate this software.", vbCritical, "VideoVision 1.0")
End If
End If
End If
End If
End If
End If
End Sub