V
VR
I am trying to use a custom cursor during drag-drop
operation between 2 ListViews. So, I have a code that at
the time GiveFeedback() is called creates a new cursor
based on the icon and text of the dragged item:
private void listView2_GiveFeedback
(
object sender,
System.Windows.Forms.GiveFeedbackEventArgs e
)
{
string szText = ...;
Bitmap oBitmap = new Bitmap(...);
Cursor oNewCursor = CreateCursor(oBitmap, szText);
e.UseDefaultCursors = false;
this.Cursor = oNewCursor;
}
The problem is that once I stop dragging the item, my
mouse cursor turns back to normal, when it's over listview
controls, but over the form it still looks like the custom
cursor I created.
I suspect that somewhere I have to set UseDefaultCursors
back to true, as well as I should set the cursor itself
back to Cursors.Arrow.
The question is where should I do it? Which other event
has the same parameters so I would have access to
UseDefaultCursors?
Thanks,
VR
operation between 2 ListViews. So, I have a code that at
the time GiveFeedback() is called creates a new cursor
based on the icon and text of the dragged item:
private void listView2_GiveFeedback
(
object sender,
System.Windows.Forms.GiveFeedbackEventArgs e
)
{
string szText = ...;
Bitmap oBitmap = new Bitmap(...);
Cursor oNewCursor = CreateCursor(oBitmap, szText);
e.UseDefaultCursors = false;
this.Cursor = oNewCursor;
}
The problem is that once I stop dragging the item, my
mouse cursor turns back to normal, when it's over listview
controls, but over the form it still looks like the custom
cursor I created.
I suspect that somewhere I have to set UseDefaultCursors
back to true, as well as I should set the cursor itself
back to Cursors.Arrow.
The question is where should I do it? Which other event
has the same parameters so I would have access to
UseDefaultCursors?
Thanks,
VR