Device Class (Microsoft.DirectX.DirectDraw)

Warning: This class is deprecated. Deprecated components of Microsoft DirectX 9.0 for Managed Code are considered obsolete. While these components are still supported in this release of DirectX 9.0 for Managed Code, they may be removed in the future. When writing new applications, you should avoid using these deprecated components. When modifying existing applications, you are strongly encouraged to remove any dependency on these components.

Applications use the methods of the Device object to create DirectDraw objects and work with system-level variables. Deprecated.

Definition

Visual Basic Public Class Device
    Inherits MarshalByRefObjectLeave Site
    Implements IDisposableLeave Site
C# public class Device : MarshalByRefObjectLeave Site, IDisposableLeave Site
C++ public ref class Device : MarshalByRefObjectLeave Site, IDisposableLeave Site
JScript public class Device extends MarshalByRefObjectLeave Site implements IDisposableLeave Site

Members Table

The following table lists the members exposed by the object.

Events

Event Description
Disposing
Warning: This event is deprecated. Deprecated components of DirectX 9.0 for Managed Code are considered obsolete. While these components are still supported in this release of DirectX 9.0 for Managed Code, they may be removed in the future. When writing new applications, you should avoid using these deprecated components. When modifying existing applications, you are strongly encouraged to remove any dependency on these components.
Occurs when the Dispose method is called or when the object is finalized and collected by the garbage collector of the Microsoft .NET common language runtime. Deprecated.

Methods

Method Description
Device
Warning: This method is deprecated. Deprecated components of DirectX 9.0 for Managed Code are considered obsolete. While these components are still supported in this release of DirectX 9.0 for Managed Code, they may be removed in the future. When writing new applications, you should avoid using these deprecated components. When modifying existing applications, you are strongly encouraged to remove any dependency on these components.
Initializes a new instance of the object. Deprecated.
Dispose
Warning: This method is deprecated. Deprecated components of DirectX 9.0 for Managed Code are considered obsolete. While these components are still supported in this release of DirectX 9.0 for Managed Code, they may be removed in the future. When writing new applications, you should avoid using these deprecated components. When modifying existing applications, you are strongly encouraged to remove any dependency on these components.
Immediately releases the unmanaged resources used by an object. Deprecated.
Equals
Warning: This method is deprecated. Deprecated components of DirectX 9.0 for Managed Code are considered obsolete. While these components are still supported in this release of DirectX 9.0 for Managed Code, they may be removed in the future. When writing new applications, you should avoid using these deprecated components. When modifying existing applications, you are strongly encouraged to remove any dependency on these components.
Returns a value that indicates whether the current instance is equal to a specified object. Deprecated.
Finalize
Warning: This method is deprecated. Deprecated components of DirectX 9.0 for Managed Code are considered obsolete. While these components are still supported in this release of DirectX 9.0 for Managed Code, they may be removed in the future. When writing new applications, you should avoid using these deprecated components. When modifying existing applications, you are strongly encouraged to remove any dependency on these components.
Called during garbage collection. If implemented, allows an object to free resources before it is destroyed by the garbage collector. Deprecated.
FlipToGdiSurface
Warning: This method is deprecated. Deprecated components of DirectX 9.0 for Managed Code are considered obsolete. While these components are still supported in this release of DirectX 9.0 for Managed Code, they may be removed in the future. When writing new applications, you should avoid using these deprecated components. When modifying existing applications, you are strongly encouraged to remove any dependency on these components.
Makes the surface that the GDI writes to the primary surface. Deprecated.
GetAvailableVideoMemory
Warning: This method is deprecated. Deprecated components of DirectX 9.0 for Managed Code are considered obsolete. While these components are still supported in this release of DirectX 9.0 for Managed Code, they may be removed in the future. When writing new applications, you should avoid using these deprecated components. When modifying existing applications, you are strongly encouraged to remove any dependency on these components.
Retrieves the total amount of display memory available and the amount of display memory currently free for a given type of surface. Deprecated.
GetCaps
Warning: This method is deprecated. Deprecated components of DirectX 9.0 for Managed Code are considered obsolete. While these components are still supported in this release of DirectX 9.0 for Managed Code, they may be removed in the future. When writing new applications, you should avoid using these deprecated components. When modifying existing applications, you are strongly encouraged to remove any dependency on these components.
Fills in the capabilities of the device driver for the hardware and the hardware emulation layer (HEL). Deprecated.
GetDeviceInformation
Warning: This method is deprecated. Deprecated components of DirectX 9.0 for Managed Code are considered obsolete. While these components are still supported in this release of DirectX 9.0 for Managed Code, they may be removed in the future. When writing new applications, you should avoid using these deprecated components. When modifying existing applications, you are strongly encouraged to remove any dependency on these components.
Obtains information about the driver. This method can be used, with caution, to recognize specific hardware installations to implement workarounds for poor driver or chipset behavior. Deprecated.
GetHashCode
Warning: This method is deprecated. Deprecated components of DirectX 9.0 for Managed Code are considered obsolete. While these components are still supported in this release of DirectX 9.0 for Managed Code, they may be removed in the future. When writing new applications, you should avoid using these deprecated components. When modifying existing applications, you are strongly encouraged to remove any dependency on these components.
Returns the hash code for the current instance. Deprecated.
GetSurfaceFromDC
Warning: This method is deprecated. Deprecated components of DirectX 9.0 for Managed Code are considered obsolete. While these components are still supported in this release of DirectX 9.0 for Managed Code, they may be removed in the future. When writing new applications, you should avoid using these deprecated components. When modifying existing applications, you are strongly encouraged to remove any dependency on these components.
Retrieves the Surface object for a surface, based on its GDI device context handle. Deprecated.
static (Shared in Visual Basic) op_Equality
Warning: This method is deprecated. Deprecated components of DirectX 9.0 for Managed Code are considered obsolete. While these components are still supported in this release of DirectX 9.0 for Managed Code, they may be removed in the future. When writing new applications, you should avoid using these deprecated components. When modifying existing applications, you are strongly encouraged to remove any dependency on these components.
Compares the current instance of a class to another instance to determine whether they are the same. Deprecated.
static (Shared in Visual Basic) op_Inequality
Warning: This method is deprecated. Deprecated components of DirectX 9.0 for Managed Code are considered obsolete. While these components are still supported in this release of DirectX 9.0 for Managed Code, they may be removed in the future. When writing new applications, you should avoid using these deprecated components. When modifying existing applications, you are strongly encouraged to remove any dependency on these components.
Compares the current instance of a class to another instance to determine whether they are different. Deprecated.
raise_Disposing
Warning: This method is deprecated. Deprecated components of DirectX 9.0 for Managed Code are considered obsolete. While these components are still supported in this release of DirectX 9.0 for Managed Code, they may be removed in the future. When writing new applications, you should avoid using these deprecated components. When modifying existing applications, you are strongly encouraged to remove any dependency on these components.
Deprecated.
RestoreAllSurfaces
Warning: This method is deprecated. Deprecated components of DirectX 9.0 for Managed Code are considered obsolete. While these components are still supported in this release of DirectX 9.0 for Managed Code, they may be removed in the future. When writing new applications, you should avoid using these deprecated components. When modifying existing applications, you are strongly encouraged to remove any dependency on these components.
Restores all the surfaces created for the DirectDraw object, in the order that they were created. Deprecated.
RestoreDisplayMode
Warning: This method is deprecated. Deprecated components of DirectX 9.0 for Managed Code are considered obsolete. While these components are still supported in this release of DirectX 9.0 for Managed Code, they may be removed in the future. When writing new applications, you should avoid using these deprecated components. When modifying existing applications, you are strongly encouraged to remove any dependency on these components.
Resets the mode of the display device hardware for the primary surface to what it was before the SetDisplayMode method was called. Exclusive-level access is required to use this method. Deprecated.
SetCooperativeLevel
Warning: This method is deprecated. Deprecated components of DirectX 9.0 for Managed Code are considered obsolete. While these components are still supported in this release of DirectX 9.0 for Managed Code, they may be removed in the future. When writing new applications, you should avoid using these deprecated components. When modifying existing applications, you are strongly encouraged to remove any dependency on these components.
Determines the top-level behavior of the application. Deprecated.
SetDisplayMode
Warning: This method is deprecated. Deprecated components of DirectX 9.0 for Managed Code are considered obsolete. While these components are still supported in this release of DirectX 9.0 for Managed Code, they may be removed in the future. When writing new applications, you should avoid using these deprecated components. When modifying existing applications, you are strongly encouraged to remove any dependency on these components.
Sets the mode of the display-device hardware. Deprecated.
TestCooperativeLevel
Warning: This method is deprecated. Deprecated components of DirectX 9.0 for Managed Code are considered obsolete. While these components are still supported in this release of DirectX 9.0 for Managed Code, they may be removed in the future. When writing new applications, you should avoid using these deprecated components. When modifying existing applications, you are strongly encouraged to remove any dependency on these components.
Reports the current cooperative-level status of the device for a windowed or full-screen application. Deprecated.
WaitForVerticalBlank
Warning: This method is deprecated. Deprecated components of DirectX 9.0 for Managed Code are considered obsolete. While these components are still supported in this release of DirectX 9.0 for Managed Code, they may be removed in the future. When writing new applications, you should avoid using these deprecated components. When modifying existing applications, you are strongly encouraged to remove any dependency on these components.
Helps the application synchronize itself with the vertical-blank interval. Deprecated.

Properties

Property Description
DeviceInformation
Warning: This property is deprecated. Deprecated components of DirectX 9.0 for Managed Code are considered obsolete. While these components are still supported in this release of DirectX 9.0 for Managed Code, they may be removed in the future. When writing new applications, you should avoid using these deprecated components. When modifying existing applications, you are strongly encouraged to remove any dependency on these components.
Information about a device. Deprecated.
DisplayMode
Warning: This property is deprecated. Deprecated components of DirectX 9.0 for Managed Code are considered obsolete. While these components are still supported in this release of DirectX 9.0 for Managed Code, they may be removed in the future. When writing new applications, you should avoid using these deprecated components. When modifying existing applications, you are strongly encouraged to remove any dependency on these components.
Retrieves the current display mode. Deprecated.
Disposed
Warning: This property is deprecated. Deprecated components of DirectX 9.0 for Managed Code are considered obsolete. While these components are still supported in this release of DirectX 9.0 for Managed Code, they may be removed in the future. When writing new applications, you should avoid using these deprecated components. When modifying existing applications, you are strongly encouraged to remove any dependency on these components.
Retrieves a value that is true if the object is disposed; otherwise the value is false. Deprecated.
FourCCCodes
Warning: This property is deprecated. Deprecated components of DirectX 9.0 for Managed Code are considered obsolete. While these components are still supported in this release of DirectX 9.0 for Managed Code, they may be removed in the future. When writing new applications, you should avoid using these deprecated components. When modifying existing applications, you are strongly encouraged to remove any dependency on these components.
Retrieves the FOURCC codes supported by the DirectDraw object. Deprecated.
GdiSurface
Warning: This property is deprecated. Deprecated components of DirectX 9.0 for Managed Code are considered obsolete. While these components are still supported in this release of DirectX 9.0 for Managed Code, they may be removed in the future. When writing new applications, you should avoid using these deprecated components. When modifying existing applications, you are strongly encouraged to remove any dependency on these components.
Retrieves the DirectDrawSurface object that currently represents the surface memory that GDI is treating as the primary surface. Deprecated.
HardwareCaps
Warning: This property is deprecated. Deprecated components of DirectX 9.0 for Managed Code are considered obsolete. While these components are still supported in this release of DirectX 9.0 for Managed Code, they may be removed in the future. When writing new applications, you should avoid using these deprecated components. When modifying existing applications, you are strongly encouraged to remove any dependency on these components.
Capabilities of the device driver for the hardware. Deprecated.
HardwareEmulationCaps
Warning: This property is deprecated. Deprecated components of DirectX 9.0 for Managed Code are considered obsolete. While these components are still supported in this release of DirectX 9.0 for Managed Code, they may be removed in the future. When writing new applications, you should avoid using these deprecated components. When modifying existing applications, you are strongly encouraged to remove any dependency on these components.
Capabilities of the device driver for the hardware emulation layer (HEL). Deprecated.
MonitorFrequency
Warning: This property is deprecated. Deprecated components of DirectX 9.0 for Managed Code are considered obsolete. While these components are still supported in this release of DirectX 9.0 for Managed Code, they may be removed in the future. When writing new applications, you should avoid using these deprecated components. When modifying existing applications, you are strongly encouraged to remove any dependency on these components.
Retrieves the frequency of the monitor being driven by the DirectDraw object. Deprecated.
ScanLine
Warning: This property is deprecated. Deprecated components of DirectX 9.0 for Managed Code are considered obsolete. While these components are still supported in this release of DirectX 9.0 for Managed Code, they may be removed in the future. When writing new applications, you should avoid using these deprecated components. When modifying existing applications, you are strongly encouraged to remove any dependency on these components.
Retrieves the scan line that is currently being drawn on the monitor. Deprecated.
VerticalBlankStatus
Warning: This property is deprecated. Deprecated components of DirectX 9.0 for Managed Code are considered obsolete. While these components are still supported in this release of DirectX 9.0 for Managed Code, they may be removed in the future. When writing new applications, you should avoid using these deprecated components. When modifying existing applications, you are strongly encouraged to remove any dependency on these components.
Retrieves the status of the vertical blank. Deprecated.

Inheritance Hierarchy

ObjectLeave Site

MarshalByRefObjectLeave Site

Device

Class Information

Namespace Microsoft.DirectX.DirectDraw
Assembly Microsoft.DirectX.DirectDraw (microsoft.directx.directdraw.dll)
Strong Name Microsoft.DirectX.DirectDraw,  Version=1.0.900.0,  Culture=neutral,  PublicKeyToken=d3231b57b74a1492