next up previous contents
Next: Methods Up: Properties Previous: screenSaverTimeout   Contents

displaySetting

Description

Object. Gets or sets the current display setting.


Syntax

SysInfo.displaySetting


Remarks

The property returns an object contains following properties:
pelsWidth
Pixel width
pelsHeight
Pixel height
bitsPerPel
Bits per pixel
displayFrequency
Specifies the frequency, in hertz (cycles per second), of the display device in a particular mode

If you want to test if the display setting can be set, just add a test property to the object and set it to true.

Tips: Use the getDisplaySettings method to list all of the display settings. After you set the property, you can check the test property to see what has happened:
0
The settings change was successful.
1
The computer must be restarted in order for the graphics mode to work.
-1
The display driver failed the specified graphics mode.
-2
The graphics mode is not supported.


Example

//get the current display setting
var ds = SysInfo.displaySetting;
trace(ds. pelsWidth);
trace(ds. pelsHeight);
trace(ds. bitsPerPel);
trace(ds. displayFrequency);
//change the current display setting;
ds.pelsWidth = 800;
ds.pelsHeight = 600;
ds.test = true;
SysInfo.displaySetting = ds;




Copyright ©2000-2010 Shanghai TopCMM Software Technologies. All Rights Reserved.