. DirectXtras Home
        Home

DirectCommunication Xtra
DirectConnection Xtra
DirectControl Xtra
DirectEmail Xtra
DirectFTP Xtra
DirectImage Xtra
DirectInteraction Xtra
DirectOS Xtra
Documentation
License Agreement
Licensing Fees
Order Form
DirectSMS Xtra
DirectSound Xtra
DirectTransition Xtra
DirectTransition3D Xtra Set I
DirectTransition3D Xtra Set II
DirectTransition3D Xtra Set III
DirectTTS Xtra
XtrAgent
DirectXport Xtra

SpeechPlugin

Special Discounted Bundles

The Gallery
How To Order
Order Form
Check for Upgrades

Sign in
Change Your Profile

Contact Us
















    .
DirectXtras
Xtra Power for Director & Authorware



DirectOS Xtra
 Directing Windows and MacOS. The OS at your fingertips!

Authorware 4.x Compatible Authorware 5.x CompatibleAuthorware 6.x CompatibleAuthorware 7.x CompatibleDirector 5.x Compatible Director 6.x CompatibleDirector 7.x Compatible Director 8.x CompatibleDirector MX Compatible     MacOS 8.x and 9.x CompatibleMacOS X CompatibleWindows Compatible   

dosSetDisplay(integer Width, integer Height, integer Depth, integer RefreshRate, string Mode)

Tests for and sets the display to the specified dimensions, color bit depth and refresh rate.

Parameters :

Width : An integer specifying the desired screen width in pixels. 
Height : An integer specifying the desired screen height in pixels.
Depth : An integer specifying the desired color bit depth. Some common values are: 8 for 256 colors, 16 for high color (65,536 colors) and 32 for true color (16,777,216 colors).
RefreshRate : An integer specifying the desired refresh rate in hertz.
Mode : A string specifying the desired action. This parameter is case insensitive.
Possible Values :
"Permanent" : Sets the video mode immediately if possible. The video mode will not be returned to its previous state on the next restart.
"Temporary" :
Sets the video mode immediately if possible. On Windows, the video mode will be returned to its previous state on the next restart.
On MacOS, this is equivalent to "Permanent".
"Restart" : On Windows, restarts the computer into the desired video mode if possible. On MacOS, This is equivalent to "Permanent".
"Test" : Tests if it is possible to switch into the desired video mode immediately, without a restart. Returns 1 if it is possible or 0 if it is not possible in which case dosGetLastError() should be called to determine why not.
"Test Restart" : Tests if it is possible to restart the computer into the desired video mode. On MacOS, this is equivalent to "Test". Returns 1 if it is possible or 0 if it is not possible in which case dosGetLastError() should be called to determine why not.

Return Values : If Mode is "Test" or "Test Restart", an integer indicating whether the desired video mode can be set. Returns 1 if it is possible or 0 if it is not possible in which case dosGetLastError() should be called to determine why not. If Mode is "Temporary", "Permanent" or "Restart", returns 1 if the desired video mode was successfully changed or 0 if the desired video mode could not be set in which case dosGetLastError() should be called to determine why not. 

Remarks : If the screen resolution is being decreased, it is recommended that you set the Director stage location from the Director 'Movie Properties' to 'Upper left' to insure that the entire stage window will be displayed on the screen. Alternatively, you can use the windowing methods that the Xtra provides to set the stage location on the screen after decreasing the screen resolution.

On Windows, it is recommended to call dosRefreshDesktop() after changing the display settings. This will notify external applications on the display settings change and have them refresh their windows.

On Windows 9X only, a refresh rate value of 0 or 1 may be returned by dosGetDisplay() or dosGetDisplayMode(). These values represent the display hardware's default refresh rate. Furthermore, if the returned list is then passed to this function, with 0 or 1 as the refresh rate, the refresh rate will be set to the hardware default. To set the refresh rate to an optimal rate instead of the hardware default, set the RefreshRate parameter to -1.

The function may fail to set non safe or non recommended display modes although such modes may be manually set by the user.

Possible Returned Error Codes via dosGetLastError() :
10005 : Invalid value for parameter 5. 
10017 : Bad video mode. Invalid combination of screen dimensions and/or bit depth/refresh rate. 
10018 : System restart required. A system restart is required before the operation can be completed.



DirectXtras Inc.
P.O Box 2645, Menlo Park, CA, 94026, U.S.A
Voice: +1-415-5058249, Fax: +1-801-8585841
Toll Free: 1-800-4453093
E-mail General Information: info@directxtras.com
E-mail Technical Support: support@directxtras.com

Copyright 1996-2004 DirectXtras Inc. All Rights Reserved.
WebMaster: tamar@directxtras.com
Last Updated: 1/28/2003 12:12:20 PM.