Bitmap.FromResource Method
.NET Framework 2.0
Creates a Bitmap from the specified Windows resource.
Namespace: System.Drawing
Assembly: System.Drawing (in system.drawing.dll)
Assembly: System.Drawing (in system.drawing.dll)
public static Bitmap FromResource ( IntPtr hinstance, String bitmapName )
public static function FromResource ( hinstance : IntPtr, bitmapName : String ) : Bitmap
Not applicable.
Parameters
- hinstance
A handle to an instance of the executable file that contains the resource.
- bitmapName
A string containing the name of the resource bitmap.
Return Value
The Bitmap that this method creates.FromResource requires security permission to call unmanaged code. For a managed alternative for creating a bitmap from an embedded resource, see System.Drawing.Bitmap(Type,String). FromResource works only with bitmaps that are named resources in a DLL.
- SecurityPermission for calling into unmanaged code. Related enumeration: UnmanagedCode
Windows 98, Windows Server 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
The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.Community Additions
ADD
Show: