Platform SDK: DirectX |
The DirectDraw7.SetDisplayMode method sets the mode of the display-device hardware.
object.SetDisplayMode( _ w As Long, _ h As Long, _ bpp As Long, _ ref As Long, _ mode As CONST_DDSDMFLAGS)
If the method fails, it raises an error, and Err.Number can be set to one of the following values:
DDERR_GENERIC |
DDERR_INVALIDMODE |
DDERR_INVALIDOBJECT |
DDERR_INVALIDPARAMS |
DDERR_LOCKEDSURFACES |
DDERR_NOEXCLUSIVEMODE |
DDERR_SURFACEBUSY |
DDERR_UNSUPPORTED |
DDERR_UNSUPPORTEDMODE |
DDERR_WASSTILLDRAWING |
This method must be called by the same thread that created the application window.
If another application changes the display mode, the primary surface is lost, and the method returns DDERR_SURFACELOST until the primary surface is recreated to match the new display mode.
DirectDraw7.RestoreDisplayMode, DirectDraw7.GetDisplayModesEnum, DirectDraw7.SetCooperativeLevel, Setting Display Modes, Restoring Display Modes