I have written this program in DBpro to test out what Display Modes my computers can use. I thought that this might be useful for everyone.
Also, how can I make this \"very long for what it is\" code shorter, more efficient?
I haven\'t yet put comments in the code, so it might take a little working out...
Hide Mouse
white AS DWORD
black AS DWORD
green AS DWORD
red AS DWORD
white = RGB(255,255,255)
black = RGB(0,0,0)
green = RGB(0,255,0)
red = RGB(255,0,0)
w=0
Gosub AllCheck
Gosub DiffDispMode
Gosub SeeAgain
AllCheck:
For d=1 to 8
READ t$,a,b
Gosub CheckDispMode
Next d
Return
CheckDispMode:
For c=16 TO 32 Step 16
If CHECK DISPLAY MODE (a,b,c)=1
col=green:cnt$=\"\":Gosub ShowResult
Else
IF w=0 THEN col=red:cnt$=\"\'t\":Gosub ShowResult
EndIf
Next c
Return
ShowResult:
Ink col,black:Print \"Display Mode \",a,\" \",b,\" \",c, \" (\";
Ink white,black:Print t$;
Ink col,black:Print \") can\",cnt$,\" work\"
Return
DiffDispMode:
Ink white,black:Print \"Test a different Display Mode? [Y/N]\";
Gosub YNloop:If kill=1 THEN Return
Input \"First Resolution: \",a
Input \"Second Resolution: \",b
t$=\"User Defined\"
Gosub CheckDispMode
Gosub DiffDispMode
Return
SeeAgain:
Print \"Would you like to see the Display Modes that do work again? [Y/N]\";
Gosub YNloop:If kill=1 THEN Return
w=1:Restore
Gosub AllCheck
Ink white,black:Print \"That\'s it, press any key to exit\":Wait Key
Return
YNloop:
Do
If Inkey$()=\"N\" or Inkey$()=\"n\"
Print \" n\":kill=1
Sleep 100
Exit
EndIf
If Inkey$()=\"Y\" or Inkey$()=\"y\"
Print \" y\":kill=0
Exit
EndIf
Loop
Return
DATA \"VGA\",640,480
DATA \"SVGA\",800,600
DATA \"XGA\",1024,768
DATA \"WXGA\",1366,768
DATA \"Macintosh\",1152,870
DATA \"SXGA\",1280,1024
DATA \"UXGA\",1600,1200
DATA \"QXGA\",2048,1536