GfxModeWidth ( mode )
Parameters
| mode - graphics mode index, from 1 to CountGfxModes() |
Description
|
Returns the width, in pixels, of a fullscreen graphics mode. Call CountGfxModes first to build the mode list, then loop the indices reading GfxModeWidth, GfxModeHeight and GfxModeDepth to describe each mode - the standard way to populate a resolution menu. An index outside 1 to CountGfxModes() raises a runtime error in debug mode. See also: CountGfxModes, GfxModeHeight, GfxModeDepth, Graphics. |
Example
; GFXModeWidth Example ; -------------------- ; Ask the video card how many display modes it offers modes=CountGfxModes() Print "Your video card offers "+modes+" display modes." Print "" ; GFXModeWidth gives the width in pixels of each numbered mode limit=modes If limit>15 Then limit=15 For t=1 To limit Print "Mode "+t+": "+GFXModeWidth(t)+" x "+GfxModeHeight(t)+" x "+GfxModeDepth(t)+" bit" Next If modes>limit Then Print "... and "+(modes-limit)+" more." Print "" Print "Press any key to close the example" WaitKey End
Index