bufferDepth Property

MS Office DHTML, HTML & CSS

bufferDepth Property


Retrieves the number of bits per pixel used for colors on the off-screen bitmap buffer.

Syntax

HTMLN/A
Scripting[ iBitsPerPixel = ] oClientCaps.bufferDepth

Possible Values

iBitsPerPixel Integer that specifies one of the following values:
0 No explicit buffering occurs. The colorDepth property is set to the screen depth.
-1 Buffering occurs at the screen depth. The colorDepth property is set to the screen depth.
1, 4, 8, 15, 16, 24, 32 Off-screen buffering occurs based on the specified number of bits per pixel. The colorDepth property is also set to this value. The value 15 specifies 16 bits per pixel, in which only 15 bits are used in a 5-5-5 layout of red-green-blue (RGB) values.

The property is read-only with a default value of 0.

Remarks

Nonsupported values cause bufferDepth to be set to -1.

When bufferDepth is -1 and the user changes system settings that affect the screen depth, the buffer depth automatically updates to the new depth. This does not occur if bufferDepth is set to a specific value.

Example

This example displays all the properties available through the clientCaps behavior.

Sample Code

<HTML xmlns:IE>
<HEAD>
<STYLE> 
@media all {
   IE\:CLIENTCAPS {behavior:url(#default#clientCaps)}
}
</STYLE>

<SCRIPT>
function window.onload()
{
  sTempStr = "availHeight    = " + oClientCaps.availHeight    + "\n" + 
             "availWidth     = " + oClientCaps.availWidth     + "\n" + 
             "bufferDepth    = " + oClientCaps.bufferDepth    + "\n" +
             "colorDepth     = " + oClientCaps.colorDepth     + "\n" +
             "connectionType = " + oClientCaps.connectionType + "\n" +
             "cookieEnabled  = " + oClientCaps.cookieEnabled  + "\n" +  
             "cpuClass       = " + oClientCaps.cpuClass       + "\n" + 
             "height         = " + oClientCaps.height         + "\n" + 
             "javaEnabled    = " + oClientCaps.javaEnabled    + "\n" + 
             "platform       = " + oClientCaps.platform       + "\n" + 
             "systemLanguage = " + oClientCaps.systemLanguage + "\n" + 
             "userLanguage   = " + oClientCaps.userLanguage   + "\n" + 
             "width          = " + oClientCaps.width          + "\n" ;

  oPre.innerText = sTempStr;          
}
</SCRIPT>

</HEAD>
<BODY>
<H1>clientCaps Behavior Sample</H1>

<P>This example shows how to use the new <B>clientCaps</B> 
behavior, introduced in Microsoft Internet Explorer 5, to obtain 
client capabilities information. The following is a sampling of the 
information that can be obtained:</P>

<IE:CLIENTCAPS ID="oClientCaps" />

<PRE id="oPre"></PRE>
</BODY>
</HTML>
This feature requires Internet Explorer 5 or later. Click the icon below to install the latest version. Then reload this page to view the sample.
Microsoft Internet Explorer

Applies To

[ Object Name ]
PlatformVersion
Win16:
Win32:
Mac:
Unix:
WinCE:
Version data is listed when the mouse hovers over a link, or the link has focus.
clientCaps

See Also

client capabilitiesInternet Link


Back to topBack to top

Did you find this topic useful? Suggestions for other topics? write us!Internet Link

© 1999 microsoft corporation. all rights reserved. terms of useInternet Link.