ScreenList
Finds available fullscreen video modes
Syntax
`
Declare Function ScreenList ( ByVal depth As Integer = 0 ) As Integer
`
Usage
`
result = ScreenList( [ depth ] )
`
Parameters
`depth`
the color depth for which the list of modes is requested (supported depths are 8, 15, 16, 24 and 32)
Return Value
returns 0, when there are no more resolutions to read.
Description
It works like the `Dir` function: the first call to the function requires the `depth` parameter to be specified, it returns the lowest supported resolution for the requested depth. Further calls to `ScreenList` without arguments returns the next resolutions. When no more resolutions are available, `ScreenRes` returns 0.
The result of `ScreenRes` is encoded in an integer with the screen width as the high word and height and the height as the low word respectively.
Resolutions are returned from lowest to highest supported ones.
It is safe to call this function before any graphics mode has been set.
`
Dim As Integer mode, w, h
'' Find which 8bit resolutions are supported
mode = ScreenList(8)
While (mode)
w = HiWord(mode)
h = LoWord(mode)
Print Str(w) + "x" + Str(h)
mode = ScreenList
Wend
`
Dialect Differences

- Not available in the -lang qb dialect unless referenced with the alias `__Screenlist`.

Differences from QB

- New to FreeBASIC

See also

- `Screen`
- `ScreenRes`