Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

Imaging.CreateBitmapSourceFromHIcon Method

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

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

public static BitmapSource CreateBitmapSourceFromHIcon(
	IntPtr icon,
	Int32Rect sourceRect,
	BitmapSizeOptions sizeOptions


Type: System.IntPtr

A pointer to the unmanaged icon source.

Type: System.Windows.Int32Rect

The size of the source image.

Type: System.Windows.Media.Imaging.BitmapSizeOptions

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

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

© 2015 Microsoft