Device.Present Method (Rectangle, Rectangle, Control)
Presents the display with the contents of the next buffer in the sequence of back buffers owned by the device.
Namespace: Microsoft.WindowsMobile.DirectX.Direct3D
Assembly: Microsoft.WindowsMobile.DirectX (in Microsoft.WindowsMobile.DirectX.dll)
Syntax
'Declaration
Public Sub Present ( _
sourceRectangle As Rectangle, _
destRectangle As Rectangle, _
overrideWindow As Control _
)
'Usage
Dim instance As Device
Dim sourceRectangle As Rectangle
Dim destRectangle As Rectangle
Dim overrideWindow As Control
instance.Present(sourceRectangle, destRectangle, _
overrideWindow)
public void Present(
Rectangle sourceRectangle,
Rectangle destRectangle,
Control overrideWindow
)
public:
void Present(
Rectangle sourceRectangle,
Rectangle destRectangle,
Control^ overrideWindow
)
public function Present(
sourceRectangle : Rectangle,
destRectangle : Rectangle,
overrideWindow : Control
)
Parameters
sourceRectangle
Type: System.Drawing.RectangleA Rectangle that contains the source rectangle. If the rectangle exceeds the source surface, it is clipped to the source surface. This parameter can be used only if the swap chain was created with Copy.
destRectangle
Type: System.Drawing.RectangleA Rectangle that contains the destination rectangle. This parameter can be used only if the swap chain was created with Copy.
overrideWindow
Type: System.Windows.Forms.ControlMust be nulla null reference (Nothing in Visual Basic).
Exceptions
Exception | Condition |
---|---|
DriverInternalErrorException | Internal driver error. Applications should generally shut down when receiving this error. |
DeviceLostException | The device is lost but cannot be reset at this time. Therefore, rendering is not possible. |
InvalidCallException | The method call is invalid. For example, a method's parameter might contain an invalid value. |
Remarks
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 and throws an InvalidCallException exception if it is called between BeginScene and EndScene pairs, unless the render target is not the current render target such as the back buffer that results from the creation of an additional swap chain.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.
Platforms
Windows CE, Windows Mobile for Smartphone, Windows Mobile for Pocket PC
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Version Information
.NET Compact Framework
Supported in: 3.5, 2.0