更新 : 2007 年 11 月
指定したビットマップへのレンダリングをサポートします。
名前空間 :
System.Windows.Forms アセンブリ :
System.Windows.Forms (System.Windows.Forms.dll 内)
<UIPermissionAttribute(SecurityAction.Demand, Window := UIPermissionWindow.AllWindows)> _
Public Sub DrawToBitmap ( _
bitmap As Bitmap, _
targetBounds As Rectangle _
)
Dim instance As Control
Dim bitmap As Bitmap
Dim targetBounds As Rectangle
instance.DrawToBitmap(bitmap, targetBounds)
[UIPermissionAttribute(SecurityAction.Demand, Window = UIPermissionWindow.AllWindows)]
public void DrawToBitmap(
Bitmap bitmap,
Rectangle targetBounds
)
[UIPermissionAttribute(SecurityAction::Demand, Window = UIPermissionWindow::AllWindows)]
public:
void DrawToBitmap(
Bitmap^ bitmap,
Rectangle targetBounds
)
/** @attribute UIPermissionAttribute(SecurityAction.Demand, Window = UIPermissionWindow.AllWindows) */
public void DrawToBitmap(
Bitmap bitmap,
Rectangle targetBounds
)
public function DrawToBitmap(
bitmap : Bitmap,
targetBounds : Rectangle
)
ActiveX コントロールでは、DrawToBitmap メソッドはサポートされていません。OnPrint イベントをオーバーライドして、必要に応じてカスタム出力ロジックを指定できます。
DrawToBitmap メソッドには、次の制限があります。
サイズの大きなビットマップでは ArgumentException がスローされる場合があります。最大許容サイズは、コンピュータによって異なります。
DrawToBitmap では、Windows XP Tablet PC Edition 2005 オペレーティング システムの Ink コントロールはサポートされません。
TextBox の Visible プロパティが false に設定されている場合、DrawToBitmap は、子 TextBox を描画しません。
コンテナ内部のコントロールは、逆順でレンダリングされます。
RichTextBox では、DrawToBitmap の機能が制限され、ビットマップの境界しか描画されません。
Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98
.NET Framework および .NET Compact Framework では、各プラットフォームのすべてのバージョンはサポートしていません。サポートされているバージョンについては、「.NET Framework システム要件」を参照してください。
.NET Framework
サポート対象 : 3.5、3.0、2.0
参照