Control.DrawToBitmap(Bitmap, Rectangle) 方法

定义

支持对指定位图的呈现。

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

参数

bitmap
Bitmap

要绘制到的位图。

targetBounds
Rectangle

呈现控件时的边界。

注解

ActiveX 控件不支持该方法 DrawToBitmap 。 如果需要, OnPrint 可以重写事件并提供自定义打印逻辑。

该方法 DrawToBitmap 具有以下限制:

适用于

产品 版本
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8
Windows Desktop 3.0, 3.1, 5, 6, 7

另请参阅