Code archives/Graphics/Listing Available Graphics Modes

This code has been declared by its author to be Public Domain code.

Download source code

Listing Available Graphics Modes by SillyPutty2005
This will retrieve all graphics modes compatible with your vide card
Strict

setgraphicsdriver glmax2ddriver()

Graphics 640,480,0

Global width
Global height
Global depth
Global hertz

Global n = CountGraphicsModes()

While Not KeyDown(KEY_ESCAPE)
SetOrigin 10,10

DrawText "Graphics modes available",10,10

SetOrigin 10,40
For Local x# = 0 To n-1
GetGraphicsMode(x,width,height,depth,hertz)
DrawText "Mode: Width: " + width + " Height: " + height + " Depth: " + depth + " Hertz: " + hertz,10,10*x
Next

Flip
Cls
Wend

Comments

None.

Code Archives Forum