Change Cursor During Drag And Drop VB.NET

Posted on 2014-07-11
Last Modified: 2014-07-21
A have a label “Label2” that I am coping data from and to a textbox named “textbox2” using drag and drop which works fine. I would like to change the default cursor to the data being dragged until the process is complete. It that doable?
VB.NET 2013 windows form
Question by:mickeyshelley1
    LVL 14

    Accepted Solution

    There are a bunch of different cursors you can use using the CSS cursor property. You can check them out by hovering over the different options at or the most widely compatible ones can be found below. You can even use an image such as

    .custom {
       cursor: url(images/my-cursor.png), auto;

    Open in new window

    Sounds like you want the actual text to be the cursor though. The only way I could think to do this is to somehow generate an image on the fly and use that image. Not sure if there'd be enough time to generate an image before the person finished dragging and dropping. Might be better to make a default image instead.

    .auto            { cursor: auto; }
    .default         { cursor: default; }
    .none            { cursor: none; }
    .context-menu    { cursor: context-menu; }
    .help            { cursor: help; }
    .pointer         { cursor: pointer; }
    .progress        { cursor: progress; }
    .wait            { cursor: wait; }
    .cell            { cursor: cell; }
    .crosshair       { cursor: crosshair; }
    .text            { cursor: text; }
    .vertical-text   { cursor: vertical-text; }
    .alias           { cursor: alias; }
    .copy            { cursor: copy; }
    .move            { cursor: move; }
    .no-drop         { cursor: no-drop; }
    .not-allowed     { cursor: not-allowed; }
    .all-scroll      { cursor: all-scroll; }
    .col-resize      { cursor: col-resize; }
    .row-resize      { cursor: row-resize; }
    .n-resize        { cursor: n-resize; }
    .e-resize        { cursor: e-resize; }
    .s-resize        { cursor: s-resize; }
    .w-resize        { cursor: w-resize; }
    .ns-resize       { cursor: ns-resize; }
    .ew-resize       { cursor: ew-resize; }
    .ne-resize       { cursor: ne-resize; }
    .nw-resize       { cursor: nw-resize; }
    .se-resize       { cursor: se-resize; }
    .sw-resize       { cursor: sw-resize; }
    .nesw-resize     { cursor: nesw-resize; }
    .nwse-resize     { cursor: nwse-resize; }

    Open in new window

    LVL 77

    Expert Comment

    by:David Johnson, CD, MVP
    he is using winforms so
    you have to set e.UseDefaultCursor = False in your GiveFeedback event handler to make your cursor change visible. Without it, drag and drop always uses the default cursors.
    LVL 14

    Expert Comment

    Ah, good catch David. Looked quickly and saw .NET and that it had been moved from Classic. Missed the last line of his question. My bad.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
    If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
    Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

    755 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    22 Experts available now in Live!

    Get 1:1 Help Now