. DirectXtras Home

DirectCommunication Xtra
DirectConnection Xtra
DirectControl Xtra
DirectEmail Xtra
DirectFTP Xtra
DirectImage Xtra
DirectInteraction Xtra
DirectOS Xtra
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
DirectXport Xtra


Special Discounted Bundles

The Gallery
How To Order
Order Form
Check for Upgrades

Sign in
Change Your Profile

Contact Us

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   

dosGetDisplayMode(integer DisplayModeNumber)

Returns the width, height, bit depth and refresh rate of the specified display settings as a linear list.

This function can be used to query for all available display modes on the system as follows:

Make a series of calls to this function. Set DisplayModeNumber to 1 for the first call, and increment DisplayModeNumber by one for each subsequent call. Continue calling the function until the return value is an empty list or dosGetLastError() returns 10040.

Parameters :

DisplayModeNumber: An integer specifying the number of the display mode. This can be any number starting with the first available display mode, 1, to the total number of display modes available on the system.

Return Value : A linear list containing 4 integers where the first integer is the the display width in pixels, the second integer is the display height in pixels, the third integer is the display color depth in bits, and the the fourth integer is the display refresh rate in hertz. For example, a possible return value could be [1024, 768, 16, 75].
If an error occurred, an empty linear list is returned, in which case dosGetLastError() should be called to determine the cause of the error. 

Remarks :

The function returns only safe and recommended display modes.

On Windows 9X only, a refresh rate value of 0 or 1 may be returned. These values represent the display hardware's default refresh rate. Furthermore, if the returned list is then passed to the dosSetDisplay(), 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 dosSetDisplay() RefreshRate parameter to -1.

Possible Returned Error Codes via dosGetLastError() :
10017 : Bad video mode. Invalid combination of screen dimensions and/or bit depth/refresh rate. 
10040 : Invalid display mode was specified.

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:00:48 PM.