Microsoft DirectX 8.1 (Visual Basic)

Direct3D8.GetAdapterDisplayMode

Retrieves the current display mode of the adapter.

object.GetAdapterDisplayMode( _ 
    Adapter As Long, _ 
    Mode As D3DDISPLAYMODE)

Parts

object
Object expression that resolves to a Direct3D8 object.
Adapter
Ordinal number that denotes the display adapter to query. D3DADAPTER_DEFAULT is always the primary display adapter.
Mode
A D3DDISPLAYMODE type, to be filled with information describing the current adapter's mode.

Error Codes

If the method fails, an error is raised and Err.Number can be set to one of the following values.

D3DERR_INVALIDCALL
D3DERR_OUTOFVIDEOMEMORY

For information on trapping errors, see the Microsoft® Visual Basic® Error Handling topic.

Remarks

Note that a device that represents an adapter may have been reset into a mode other than the adapter's mode. In this case, if the device is lost, it will not determine the adapter's current mode. This function returns the adapter mode, not any particular device's desired mode.