Tech Off Thread

1 post

Forum Read Only

This forum has been made read only by the site admins. No new threads or comments can be added.

C#: associate an image to a cursor.

Back to Forum: Tech Off
  • User profile image

    Hello to all!   

    I working with drag & drop of images from one picturebox to an other control in C#.

    The drag&drop works correctly but, during the movement of mouse, I must associate to the cursor the image that I have dragged.

    I test various codes in body of DragOver event but I have not still found one solution.   

    Someone has an idea of as it can be made?  

    I have tried to design a rectangle capturing the graphics from original picturebox, but the part not to go.
    Moreover, I have tried to construct a cursore explicitly like this:  

    Bitmap b = new Bitmap (My_Image); 
    Cursor c = new Cursor (b.GetHicon ()); 
    Cursor.current = c;   

    It seems to work also but image associated to cursor isn't visualized correctly, pheraps for refresh during mouse movement...
    The effect that I wanted to obtain was the same of "ghost drag" for listview….   



Conversation locked

This conversation has been locked by the site admins. No new comments can be made.