System.Windows.Forms.Control.DrawToBitmap Method

Supports rendering to the specified bitmap.

Syntax

public void DrawToBitmap (System.Drawing.Bitmap bitmap, System.Drawing.Rectangle targetBounds)

Parameters

bitmap
The bitmap to be drawn to.
targetBounds
The bounds within which the control is rendered.

Remarks

The Control.DrawToBitmap(System.Drawing.Bitmap, System.Drawing.Rectangle) method is not supported for ActiveX controls. You can override the Control.OnPrint(PaintEventArgs) event and provide custom printing logic if required.

The Control.DrawToBitmap(System.Drawing.Bitmap, System.Drawing.Rectangle) method has the following limitations:

Requirements

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Assembly Versions: 2.0.0.0