Device.SetDialogBoxesEnabled(Boolean) Method (Microsoft.DirectX.Direct3D)

Enables the use of Microsoft Windows Graphics Device Interface (GDI) dialog boxes in full-screen applications.

Definition

Visual Basic Public Sub SetDialogBoxesEnabled( _
    ByVal value As Boolean _
)
C# public void SetDialogBoxesEnabled(
    bool value
);
C++ public:
void SetDialogBoxesEnabled(
    bool value
);
JScript public function SetDialogBoxesEnabled(
    value : boolean
);

Parameters

value System.Boolean
Set to true to enable GDI dialog boxes. Set to false to disable GDI dialog boxes.

Remarks

The GDI dialog boxes must be created as child elements to the device window. They should also be created within the same thread that created the device, because this enables the parent window to manage redrawing of the child window.

This method has no effect on applications in windowed mode, but its setting takes effect if the application resets the device into full-screen mode. If SetDialogBoxesEnabled succeeds in a windowed-mode application, any subsequent reset to full-screen mode is checked against the restrictions cited above. Also, because SetDialogBoxesEnabled causes all back buffers on the swap chain to be discarded, an application is expected to refresh its content for all back buffers after the call.

Exceptions

InvalidCallException: The method call is invalid. For example, a method's parameter might contain an invalid value.

This method also might fail if the all of the following are conditions are present.