共用方式為


Imaging.CreateBitmapSourceFromHIcon 方法

定義

根據所提供之 Unmanaged 圖示影像的指標,傳回 Managed BitmapSource

public:
 static System::Windows::Media::Imaging::BitmapSource ^ CreateBitmapSourceFromHIcon(IntPtr icon, System::Windows::Int32Rect sourceRect, System::Windows::Media::Imaging::BitmapSizeOptions ^ sizeOptions);
[System.Security.SecurityCritical]
public static System.Windows.Media.Imaging.BitmapSource CreateBitmapSourceFromHIcon (IntPtr icon, System.Windows.Int32Rect sourceRect, System.Windows.Media.Imaging.BitmapSizeOptions sizeOptions);
public static System.Windows.Media.Imaging.BitmapSource CreateBitmapSourceFromHIcon (IntPtr icon, System.Windows.Int32Rect sourceRect, System.Windows.Media.Imaging.BitmapSizeOptions sizeOptions);
[<System.Security.SecurityCritical>]
static member CreateBitmapSourceFromHIcon : nativeint * System.Windows.Int32Rect * System.Windows.Media.Imaging.BitmapSizeOptions -> System.Windows.Media.Imaging.BitmapSource
static member CreateBitmapSourceFromHIcon : nativeint * System.Windows.Int32Rect * System.Windows.Media.Imaging.BitmapSizeOptions -> System.Windows.Media.Imaging.BitmapSource
Public Shared Function CreateBitmapSourceFromHIcon (icon As IntPtr, sourceRect As Int32Rect, sizeOptions As BitmapSizeOptions) As BitmapSource

參數

icon
IntPtr

nativeint

指向 Unmanaged 圖示來源的指標。

sourceRect
Int32Rect

來源影像的大小。

sizeOptions
BitmapSizeOptions

列舉型別的值,指定轉換的處理方式。

傳回

BitmapSource

建立的 BitmapSource

屬性

適用於

另請參閱