Control.DrawToBitmap(Bitmap, Rectangle) 方法
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
支援呈現為指定的點陣圖。
public:
void DrawToBitmap(System::Drawing::Bitmap ^ bitmap, System::Drawing::Rectangle targetBounds);
C#
public void DrawToBitmap (System.Drawing.Bitmap bitmap, System.Drawing.Rectangle targetBounds);
member this.DrawToBitmap : System.Drawing.Bitmap * System.Drawing.Rectangle -> unit
Public Sub DrawToBitmap (bitmap As Bitmap, targetBounds As Rectangle)
- bitmap
- Bitmap
要繪製成的點陣圖。
- targetBounds
- Rectangle
要呈現控制項的範圍。
DrawToBitmapActiveX 控制項不支援 方法。 您可以覆寫 OnPrint 事件,並視需要提供自訂列印邏輯。
方法 DrawToBitmap 有下列限制:
ArgumentException大型點陣圖可能會擲回 。 允許的大小上限會因電腦而異。
DrawToBitmap 不支援
Ink
Windows XP Tablet PC Edition 2005 作業系統的控制項。DrawToBitmap如果 的 TextBox 屬性設定
false
為 , Visible 則不會繪製子 TextBox 系。容器內的控制項會以反向順序轉譯。
DrawToBitmap 無法完整運作; RichTextBox 只會繪製點陣圖的框線。
產品 | 版本 |
---|---|
.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 |