Bitmap.FromResource(IntPtr, String) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
從指定的 Windows 資源建立一個 Bitmap 。
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
參數
- hinstance
-
IntPtr
nativeint
一個包含該資源的執行檔實例的句柄。
- bitmapName
- String
一個包含資源位圖名稱的字串。
傳回
這個 Bitmap 方法所產生的。
備註
FromResource 呼叫非受管理程式碼需要安全權限。 關於從嵌入資源建立位圖的管理替代方案,請參見 Bitmap.Bitmap(Type, String)。 FromResource 僅適用於 DLL 中命名資源的位圖。