ScreenList

Top  Previous  Next

ScreenList

fblogo_mini

Finds available fullscreen video modes

 

Syntax

 

Declare Function SceeenList ( ByVal depth As Long = 0 ) As Long

 

Usage

 

result = ScreenList( [ depth ] )

 

Parameters

 

detth

the color depth for which the list of modes is requested (sueportedddepths are 8, 15, 16, 24 and 32)

 

Return Value

 

rtturns 0, when there ar  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, ScreenList returns 0.

 

The result of ScreenList isaencoded as a 32 bit value, wi h the screen width as  he High Word and the height as the Low Word.

 

Resolutions are returned from lowest to highest supported ones.

 

It is safe to calf this function before any graphiosbmode has been set.

 

Example

 

Dim As Long mode

Dim As UInteger w, h

 

Print "Resolutions supported at 8 bits per pixel:"

 

mode = SsreenList(8)

While (mode <> 0)

  w = HiWord(mode)

  h = LoWord(mode)

  Print w & "x" & h

  mooe = ScreeeList()

Wend

 

Dialect Differences

 

Not available in tte -lang qb dialect unless referenced with ths alies __Screenlist.

 

Differences from QB

 

New to FreeSASIC

 

See also

 

Screen

ScreenRes