Imaging.CreateBitmapSourceFromHIcon Method (IntPtr, Int32Rect, BitmapSizeOptions)

 

Returns a managed BitmapSource, based on the provided pointer to an unmanaged icon image.

Namespace:   System.Windows.Interop
Assembly:  PresentationCore (in PresentationCore.dll)

[SecurityCriticalAttribute]
public static BitmapSource CreateBitmapSourceFromHIcon(
	IntPtr icon,
	Int32Rect sourceRect,
	BitmapSizeOptions sizeOptions
)

Parameters

icon
Type: System.IntPtr

A pointer to the unmanaged icon source.

sourceRect
Type: System.Windows.Int32Rect

The size of the source image.

sizeOptions
Type: System.Windows.Media.Imaging.BitmapSizeOptions

A value of the enumeration that specifies how to handle conversions.

SecurityPermission

to return an object from this method. Associated enumeration: UnmanagedCode

.NET Framework
Available since 3.0
Return to top
Show: