IconExtensionsToCursorHandle Method

KGy SOFT Drawing Libraries Help
Converts the provided icon to a CursorHandle, which can be passed to the System.Windows.Forms.Cursor constructor to create a new cursor.

Namespace:  KGySoft.Drawing
Assembly:  KGySoft.Drawing (in KGySoft.Drawing.dll) Version: 5.3.0

public static CursorHandle ToCursorHandle(
	this Icon icon,
	Point cursorHotspot = null


Type: System.DrawingIcon
The Icon, which should be converted to a cursor.
cursorHotspot (Optional)
Type: System.DrawingPoint
The hotspot coordinates of the cursor. This parameter is optional.
Default value: 0; 0 (top-left corner)

Return Value

Type: CursorHandle
A CursorHandle instance that can be used to create a System.Windows.Forms.Cursor instance.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Icon. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

PlatformNotSupportedExceptionThis method is supported on Windows only.

Note Note
This method is supported on Windows only.
See Also