Control.DrawToBitmap(Bitmap, Rectangle) Control.DrawToBitmap(Bitmap, Rectangle) Control.DrawToBitmap(Bitmap, Rectangle) Method

定义

支持对指定位图的呈现。Supports rendering to the specified bitmap.

public:
 void DrawToBitmap(System::Drawing::Bitmap ^ bitmap, System::Drawing::Rectangle targetBounds);
public void DrawToBitmap (System.Drawing.Bitmap bitmap, System.Drawing.Rectangle targetBounds);
member this.DrawToBitmap : System.Drawing.Bitmap * System.Drawing.Rectangle -> unit

参数

bitmap
Bitmap Bitmap Bitmap

要绘制到的位图。The bitmap to be drawn to.

targetBounds
Rectangle Rectangle Rectangle

呈现控件时的边界。The bounds within which the control is rendered.

注解

DrawToBitmap方法不支持 ActiveX 控件。The DrawToBitmap method is not supported for ActiveX controls. 您可以重写OnPrint事件,并根据需要提供自定义的打印逻辑。You can override the OnPrint event and provide custom printing logic if required.

DrawToBitmap方法具有以下限制:The DrawToBitmap method has the following limitations:

适用于

另请参阅