SetCursor Method

ToolboxService.SetCursor Method ()


Sets the current application's cursor to a cursor that represents the currently selected tool.

Namespace:   System.Drawing.Design
Assembly:  System.Drawing.Design (in System.Drawing.Design.dll)

protected virtual bool SetCursor()

Return Value

Type: System.Boolean

true if there is an item selected; otherwise, false.

The toolbox service provides support for setting the user interface (UI) cursor to an image that represents the currently selected toolbox item. The SetCursor method can be called to set the cursor. It returns true if the cursor is set, or false if it is not. The default implementation sets the cursor to a crosshair and returns true if there is an item selected. It returns false and leaves the cursor unchanged if no item is selected.

.NET Framework
Available since 2.0
Return to top
© 2016 Microsoft