Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
DeviceWindowHandle Property

PresentationParameters.DeviceWindowHandle Property

Gets or sets the handle to the device window.

Namespace: Microsoft.Xna.Framework.Graphics
Assembly: Microsoft.Xna.Framework.Graphics (in microsoft.xna.framework.graphics.dll)

public IntPtr DeviceWindowHandle { get; set; }

Property Value

The handle to the device window.

The device window determines the location and size of the back buffer on screen. This is used by Direct3D when the back buffer contents are copied to the front buffer during Present.

For a full screen application, this is a handle to the top window (which is the focus window). For applications that use multiple full screen devices (such as a multimonitor system), exactly one device can use the focus window as the device window. All other devices must have unique device windows.

For a windowed-mode application, this handle will be the default target window for Present. If this handle is Zero, the focus window will be taken.

Note that the runtime does not attempt to reflect user changes in window size. The back buffer is not implicitly reset when this window is reset. However, the Present method does automatically track window position changes.

Xbox 360, Windows 7, Windows Vista, Windows XP

Community Additions

ADD
Show:
© 2015 Microsoft