Control.DrawToBitmap(Bitmap, Rectangle) 方法  
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
支持对指定位图的呈现。
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 -> unitPublic Sub DrawToBitmap (bitmap As Bitmap, targetBounds As Rectangle)参数
- bitmap
- Bitmap
要绘制到的位图。
- targetBounds
- Rectangle
呈现控件时的边界。
注解
ActiveX 控件不支持该方法 DrawToBitmap 。 如果需要, OnPrint 可以重写事件并提供自定义打印逻辑。
该方法 DrawToBitmap 具有以下限制:
- 对于大型位图,可能会引发一个 ArgumentException 值。 允许的最大大小因计算机而异。 
- DrawToBitmap 不支持 - InkWindows XP 平板电脑版 2005 操作系统的控件。
- DrawToBitmap如果Visible属性设置为 - false.,则不绘制子TextBox级TextBox。
- 容器内的控件按相反顺序呈现。 
- DrawToBitmap 不完全适用于 RichTextBox位图;仅绘制位图的边框。