I'm trying to change the cursor while a drag and drop occurs between two lists in a winforms. I tried several ways (several tutorial and solutions) found over the web.
I even tried to simply change the cursor when the form loads. But as soon as the mouse moves, the cursor is back to default.
I use the following events for my drag and drop.
this.MatchRequi sitionListView. MouseUp += new System.Windows. Forms.MouseEven tHandler(this.M atchRequisition ListView_MouseU p);
this.MatchRequi sitionListView. DragDrop += new System.Windows. Forms.DragEvent Handler(this.Ma tchRequisitionL istView_DragDro p);
this.MatchRequi sitionListView. MouseMove += new System.Windows. Forms.MouseEven tHandler(this.M atchRequisition ListView_MouseM ove);
this.MatchRequi sitionListView. MouseDown += new System.Windows. Forms.MouseEven tHandler(this.M atchRequisition ListView_MouseD own);
this.MatchRequi sitionListView. DragEnter += new System.Windows. Forms.DragEvent Handler(this.Ma tchRequisitionL istView_DragEnt er);
I use this to change the cursor (didn't found a way to put and use a .cur from the LocalRessources )
IntPtr hCursor = LoadCursorFromF ile("D:\\dev\\i esidebar\\trunk \\Taleo.Plugins .IESideBar.Shar ed\\Resources\\ 3dsmove.ico");
Cursor.Current = new Cursor(hCursor) ;
Even If I put this anywhere in my code, the only thing I managed to do is change the cursor on MouseDown. But as soon as I move the mouse, the dragDrop cursor is shown.
As anyone managed to do this?
I even tried to simply change the cursor when the form loads. But as soon as the mouse moves, the cursor is back to default.
I use the following events for my drag and drop.
this.MatchRequi sitionListView. MouseUp += new System.Windows. Forms.MouseEven tHandler(this.M atchRequisition ListView_MouseU p);
this.MatchRequi sitionListView. DragDrop += new System.Windows. Forms.DragEvent Handler(this.Ma tchRequisitionL istView_DragDro p);
this.MatchRequi sitionListView. MouseMove += new System.Windows. Forms.MouseEven tHandler(this.M atchRequisition ListView_MouseM ove);
this.MatchRequi sitionListView. MouseDown += new System.Windows. Forms.MouseEven tHandler(this.M atchRequisition ListView_MouseD own);
this.MatchRequi sitionListView. DragEnter += new System.Windows. Forms.DragEvent Handler(this.Ma tchRequisitionL istView_DragEnt er);
I use this to change the cursor (didn't found a way to put and use a .cur from the LocalRessources )
IntPtr hCursor = LoadCursorFromF ile("D:\\dev\\i esidebar\\trunk \\Taleo.Plugins .IESideBar.Shar ed\\Resources\\ 3dsmove.ico");
Cursor.Current = new Cursor(hCursor) ;
Even If I put this anywhere in my code, the only thing I managed to do is change the cursor on MouseDown. But as soon as I move the mouse, the dragDrop cursor is shown.
As anyone managed to do this?
Comment