Device.Present(Rectangle,IntPtr,Boolean) Method (Microsoft.DirectX.Direct3D)

Presents the display with the contents of the next buffer in the sequence of back buffers owned by the device.


Visual Basic Public Sub Present( _
    ByVal rectPresent As RectangleLeave Site, _
    ByVal overrideWindowHandle As IntPtrLeave Site, _
    ByVal sourceRectangle As Boolean _
C# public void Present(
    RectangleLeave Site rectPresent,
    IntPtrLeave Site overrideWindowHandle,
    bool sourceRectangle
C++ public:
void Present(
    RectangleLeave Site rectPresent,
    IntPtrLeave Site overrideWindowHandle,
    bool sourceRectangle
JScript public function Present(
    rectPresent : RectangleLeave Site,
    overrideWindowHandle : IntPtrLeave Site,
    sourceRectangle : boolean


rectPresent System.Drawing.Rectangle
The RectangleLeave Site to present.
overrideWindowHandle System.IntPtr
Destination window whose client area is taken as the target for this presentation. If this parameter is not used, PresentParameters.DeviceWindow is taken.
sourceRectangle System.Boolean
Set to true if a RectangleLeave Site is being passed to the param_Rectangle_rectPresent parameter; otherwise, false.


If necessary, a stretch operation is applied to transfer the pixels within the source rectangle to the destination rectangle in the client area of the target window.

This method fails, throwing an InvalidCallException exception, if it is called between BeginScene and EndScene pairs, unless the render target is not the current render target (for example, the back buffer that results from the creation of an additional swap chain).



Internal driver error. Applications should generally shut down when receiving this error.


The device is lost but cannot be reset at this time. Therefore, rendering is not possible.


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

See Also