Image.FromHbitmap Methode

Definition

Erstellt eine Bitmap aus einem Windows-Handle.

Überlädt

FromHbitmap(IntPtr)

Erstellt eine Bitmap aus einem Handle für eine GDI-Bitmap.

FromHbitmap(IntPtr, IntPtr)

Erstellt eine Bitmap aus einem Handle für eine GDI-Bitmap und einem Handle für eine GDI-Palette.

FromHbitmap(IntPtr)

Quelle:
Image.cs
Quelle:
Image.cs
Quelle:
Image.cs

Erstellt eine Bitmap aus einem Handle für eine GDI-Bitmap.

public:
 static System::Drawing::Bitmap ^ FromHbitmap(IntPtr hbitmap);
public static System.Drawing.Bitmap FromHbitmap (IntPtr hbitmap);
static member FromHbitmap : nativeint -> System.Drawing.Bitmap
Public Shared Function FromHbitmap (hbitmap As IntPtr) As Bitmap

Parameter

hbitmap
IntPtr

nativeint

Das GDI-Bitmaphandle, aus dem erstellt werden Bitmapsoll.

Gibt zurück

Die Bitmap, die von dieser Methode erstellt wird.

Hinweise

Die FromHbitmap -Methode erstellt eine Kopie der GDI-Bitmap. So können Sie die eingehende GDI-Bitmap mit der GDI-Methode DeleteObject sofort nach dem Erstellen des neuen Imagefreigeben.

Gilt für:

FromHbitmap(IntPtr, IntPtr)

Quelle:
Image.cs
Quelle:
Image.cs
Quelle:
Image.cs

Erstellt eine Bitmap aus einem Handle für eine GDI-Bitmap und einem Handle für eine GDI-Palette.

public:
 static System::Drawing::Bitmap ^ FromHbitmap(IntPtr hbitmap, IntPtr hpalette);
public static System.Drawing.Bitmap FromHbitmap (IntPtr hbitmap, IntPtr hpalette);
static member FromHbitmap : nativeint * nativeint -> System.Drawing.Bitmap
Public Shared Function FromHbitmap (hbitmap As IntPtr, hpalette As IntPtr) As Bitmap

Parameter

hbitmap
IntPtr

nativeint

Das GDI-Bitmaphandle, aus dem erstellt werden Bitmapsoll.

hpalette
IntPtr

nativeint

Ein Handle für eine GDI-Palette, die zum Definieren der Bitmapfarben verwendet wird, wenn die im hbitmap Parameter angegebene Bitmap keine geräteunabhängige Bitmap (DEVICE-Independent Bitmap, DIB) ist.

Gibt zurück

Die Bitmap, die von dieser Methode erstellt wird.

Hinweise

Die FromHbitmap -Methode erstellt eine Kopie der GDI-Bitmap. So können Sie die eingehende GDI-Bitmap mit der GDI-Methode DeleteObject sofort nach dem Erstellen des neuen Imagefreigeben.

Gilt für: