Bitmap.FromResource(IntPtr, String) Método
Definição
public:
static System::Drawing::Bitmap ^ FromResource(IntPtr hinstance, System::String ^ bitmapName);
public static System.Drawing.Bitmap FromResource (IntPtr hinstance, string bitmapName);
static member FromResource : nativeint * string -> System.Drawing.Bitmap
Public Shared Function FromResource (hinstance As IntPtr, bitmapName As String) As Bitmap
Parâmetros
- hinstance
- IntPtr
Um identificador para uma instância do arquivo executável que contém o recurso.A handle to an instance of the executable file that contains the resource.
- bitmapName
- String
Uma cadeia de caracteres que contém o nome do bitmap do recurso.A string that contains the name of the resource bitmap.
Retornos
O Bitmap criado por esse método.The Bitmap that this method creates.
Comentários
FromResource requer permissão de segurança para chamar código não gerenciado.FromResource requires security permission to call unmanaged code. Para obter uma alternativa gerenciada para criar um bitmap de um recurso inserido, consulte Bitmap.Bitmap(Type, String) .For a managed alternative for creating a bitmap from an embedded resource, see Bitmap.Bitmap(Type, String). FromResource funciona somente com bitmaps nomeados como recursos em uma DLL.FromResource works only with bitmaps that are named resources in a DLL.