Icon.ToBitmap メソッド
アセンブリ: System.Drawing (system.drawing.dll 内)

Dim instance As Icon Dim returnValue As Bitmap returnValue = instance.ToBitmap
変換された Icon を表す Bitmap。


ToBitmap メソッドを使用する方法を次のコード例に示します。この例は、Windows フォームでの使用を意図してデザインされています。フォームを作成し、次のコードを貼り付けます。フォームの Paint イベント ハンドラで IconToBitmap メソッドを呼び出し、e を PaintEventArgs として渡します。
Private Sub IconToBitmap(ByVal e As PaintEventArgs) ' Construct an Icon. Dim icon1 As New Icon(SystemIcons.Exclamation, 40, 40) ' Call ToBitmap to convert it. Dim bmp As Bitmap = icon1.ToBitmap() ' Draw the bitmap. e.Graphics.DrawImage(bmp, New Point(30, 30)) End Sub
private void IconToBitmap(PaintEventArgs e) { // Construct an Icon. Icon icon1 = new Icon(SystemIcons.Exclamation, 40, 40); // Call ToBitmap to convert it. Bitmap bmp = icon1.ToBitmap(); // Draw the bitmap. e.Graphics.DrawImage(bmp, new Point(30, 30)); }

Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Weblioに収録されているすべての辞書からIcon.ToBitmap メソッドを検索する場合は、下記のリンクをクリックしてください。

- Icon.ToBitmap メソッドのページへのリンク