Get(ScreenDepth)

Category: Get

Syntax: Get ( ScreenDepth )

Parameters: None

Data type returned: Number

Description:

Returns the number of bits needed to represent the color or shade of gray of a pixel on the user's monitor. A value of 8 represents 256 (equal to 2^8) colors or shades of gray.

Use Get (ScreenDepth) to alert users if their monitor color settings are set too low to view images correctly. For example,

If[Get(ScreenDepth)<32] Show Custom Dialog ["Color";"Your monitor should be set to "Millions of colors" to display images correctly"] End If

Examples:

Function

Results

Get (ScreenDepth)

Returns 32 on a display showing millions (2^32) of colors.

 

Returns 16 on a display showing thousands (2^16) of colors.

 

Returns 4 on a VGA display.

 

Returns 1 on a black-and-white display.

Категории