{{fbdoc item="title" value="SCREENINFO"}}----
Retrieves information about current video mode or the desktop.

{{fbdoc item="syntax"}}##
	[[KeyPgDeclare|declare]] [[KeyPgSub|sub]] **Screeninfo** ( [[KeyPgByref|byref]] //w// [[KeyPgAs|as]] [[KeyPgInteger|integer]] = 0, [[KeyPgByref|byref]] //h// [[KeyPgAs|as]] [[KeyPgInteger|integer]] = 0, [[KeyPgByref|byref]] //depth// [[KeyPgAs|as]] [[KeyPgInteger|integer]] = 0, [[KeyPgByref|byref]] //bpp// [[KeyPgAs|as]] [[KeyPgInteger|integer]] = 0, [[KeyPgByref|byref]] //pitch// [[KeyPgAs|as]] [[KeyPgInteger|integer]] = 0, [[KeyPgByref|byref]] //rate// [[KeyPgAs|as]] [[KeyPgInteger|integer]] = 0, [[KeyPgByref|byref]] //driver// [[KeyPgAs|as]] [[KeyPgString|string]] = "####" )
##
{{fbdoc item="usage"}}##
	**Screeninfo** [ //w// ] [, [ //h// ] [, [ //depth// ] [ , [ //bpp// ] [ , [ //pitch// ] [ , [ //rate// ] [, //driver// ]]]]]
##
{{fbdoc item="param"}}
	##//w//##
		Width.
	##//h//##
		Height.
	##//depth//##
		Color depth in bits.
	##//bpp//##
		Bytes per pixel.
	##//pitch//##
		Bytes per scan line.
	##//rate//##
		Refresh rate.
	##//driver//##
		Driver name.

{{fbdoc item="desc"}}
	This function can be useful to get current mode informations like graphics driver name, color depth, screen size and more.
	
	If ##**Screeninfo**## is called when no graphics mode is set, it returns the information about the desktop.
	
	Here's a description of available fields:
	
	{{table columns="2" cellpadding="1" cells="w;Width of the screen in pixels;h;Height of the screen in pixels;depth;Current pixel format bits per pixel: this can be 1, 2, 4, 8, 16, or 32;bpp;Bytes per pixel;pitch;Size of a framebuffer row in bytes;rate;Current refresh rate, or 0 if unknown;driver;Name of current graphics driver in use, like DirectX or X11"}}

{{fbdoc item="ex"}}
{{fbdoc item="filename" value="examples/manual/gfx/screeninfo.bas"}}%%(freebasic)
dim w as integer, h as integer
dim depth as integer
dim driver_name as string

SCREEN 15, 32 
' Obtain info about current mode 
SCREENINFO w, h, depth,,,,driver_name
PRINT STR(w) + "x" + STR(h) + "x" + STR(depth); 
PRINT " using " + driver_name + " driver" 
SLEEP 
' Quit graphics mode and obtain info about desktop 
SCREEN 0 
SCREENINFO w, h, depth 
PRINT "Desktop running at " + STR(w) + "x" + STR(h) + "x" + STR(depth); 
%%

{{fbdoc item="lang"}}
	- Not available in the //[[CompilerOptlang|-lang qb]]// dialect unless referenced with the alias ##**""__Screeninfo""**##.

{{fbdoc item="diff"}}
	- New to ""FreeBASIC""

{{fbdoc item="see"}}
	- ##[[KeyPgScreengraphics|Screen (Graphics)]]##

{{fbdoc item="back" value="CatPgGfxScreen|Screen Functions"}}