skip navigation
  • Product Bundles

    DevCraft

    All Telerik .NET tools and Kendo UI JavaScript components in one package. Now enhanced with:

    • AI Coding Assistants
    • Embedded Reporting
    • Document Processing Libraries
    • SSO Account Sign-in

    Web

    Kendo UI UI for Angular UI for Vue UI for jQuery KendoReact UI for Blazor UI for ASP.NET Core UI for ASP.NET MVC UI for ASP.NET AJAX

    Mobile

    UI for .NET MAUI

    Document Management

    Telerik Document Processing

    Desktop

    UI for .NET MAUI UI for WinUI UI for WinForms UI for WPF

    Reporting

    Telerik Reporting Telerik Report Server

    Testing & Mocking

    Test Studio Telerik JustMock

    CMS

    Sitefinity

    AI Productivity Tools

    AI Coding Assistants

    UI/UX Tools

    ThemeBuilder Design System Kit Templates and Building Blocks

    Debugging

    Fiddler Fiddler Everywhere Fiddler Classic Fiddler Everywhere Reporter FiddlerCore

    Free Tools

    KendoReact Free VB.NET to C# Converter Testing Framework
    View all products
  • Overview
  • Demos
    • What's New
    • Roadmap
    • Release History
  • Support and Learning

    • Support and Learning Hub
    • First Steps
    • Docs
    • Demos
    • Virtual Classroom
    • Forums
    • Videos
    • Blogs
    • Accessibility
    • Submit a Ticket

    Productivity and Design Tools

    • Visual Studio Extensions
    • Visual Studio Templates
    • Embedded Reporting
  • Pricing
  • Shopping cart
    • Account Overview
    • Your Licenses
    • Downloads
    • Support Center
    • Forum Profile
    • Payment Methods
    • Edit Profile
    • Log out
  • Login
  • Contact Us
  • Try now

Class CursorHelper

Provides utility methods for creating and managing custom cursors with DPI scaling support.

Inheritance
System.Object
CursorHelper
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Telerik.WinControls
Assembly: Telerik.WinControls.dll

Syntax

public static class CursorHelper
Remarks

CursorHelper contains static methods for creating custom cursors from bitmaps and managing DPI-aware cursor scaling. It includes functionality for creating cursors with custom hot spots and provides built-in flipped arrow cursors optimized for different DPI settings.

Key features include:

  • Custom cursor creation from bitmap images with configurable hot spots
  • DPI-aware cursor scaling for high-resolution displays
  • Built-in flipped arrow cursor with automatic scaling
  • Cursor caching to improve performance and memory usage
  • SVG-based cursor generation for crisp rendering at any scale

This class is essential for applications that need custom cursors or DPI-aware cursor behavior, particularly in high-DPI environments where standard cursors may appear too small or pixelated.

Properties

FlippedArrowCursor

Gets a flipped arrow cursor optimized for 96 DPI (standard resolution).

Declaration
public static Cursor FlippedArrowCursor { get; }
Property Value
System.Windows.Forms.Cursor

A System.Windows.Forms.Cursor representing a flipped arrow cursor at standard 96 DPI resolution.

Remarks

This property provides quick access to a flipped arrow cursor designed for standard DPI settings. The cursor is ideal for indicating reverse or opposite directional operations in the user interface.

For high-DPI scenarios, use GetScaledFlippedArrowCursor(SizeF) instead to ensure proper scaling.

Methods

CursorFromBitmap(Bitmap, Point)

Creates a custom cursor from a bitmap image with the specified hot spot.

Declaration
public static Cursor CursorFromBitmap(Bitmap bitmap, Point hotSpot)
Parameters
System.Drawing.Bitmap bitmap

The bitmap image to use as the cursor appearance.

System.Drawing.Point hotSpot

The point within the bitmap that represents the cursor's active point.

Returns
System.Windows.Forms.Cursor

A new System.Windows.Forms.Cursor instance created from the bitmap with the specified hot spot.

Remarks

This method converts a bitmap image into a Windows cursor by:

  1. Converting the bitmap to an icon handle using GetHicon
  2. Retrieving and modifying the icon information
  3. Setting the custom hot spot coordinates
  4. Creating the final cursor using CreateIconIndirect

The hot spot determines which pixel of the cursor image corresponds to the precise mouse position. For example, an arrow cursor typically has its hot spot at the tip of the arrow.

The caller is responsible for disposing of the returned cursor when it's no longer needed.

GetScaledFlippedArrowCursor(SizeF)

Gets a flipped arrow cursor scaled to the specified DPI scaling factor.

Declaration
public static Cursor GetScaledFlippedArrowCursor(SizeF scaling)
Parameters
System.Drawing.SizeF scaling

The scaling factor to apply to the cursor (e.g., 1.5 for 150% DPI scaling).

Returns
System.Windows.Forms.Cursor

A System.Windows.Forms.Cursor representing a flipped arrow cursor scaled for the specified DPI.

Remarks

This method provides DPI-aware flipped arrow cursors by:

  1. Loading the cursor from an embedded SVG resource for scalable rendering
  2. Caching cursors for each unique scaling factor to improve performance
  3. Calculating the appropriate size and hot spot based on the scaling factor
  4. Generating a bitmap at the target resolution for crisp appearance

The cursor uses SVG-based rendering to ensure sharp, clean appearance at any DPI setting. The hot spot is automatically scaled to maintain proper cursor behavior across different resolutions.

Cursors are cached per scaling factor, so subsequent calls with the same scaling value return the cached cursor for optimal performance.

Getting Started
  • Install Now
  • Demos
  • Step-by-Step Tutorial
  • Sample Applications
  • SDK Samples
  • Visual Studio Extensions
Support Resources
  • Code Library
  • Knowledge Base
  • Videos
Community
  • Forums
  • Blogs
  • Feedback Portal
  • Document Processing Feedback Portal

Copyright © 2018 Progress Software Corporation and/or its subsidiaries or affiliates.
All Rights Reserved.

Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks for appropriate markings.