I need to disable drag and drop feature in my list view control. Can somebody help me please?
Thanks in advance!
Printable View
I need to disable drag and drop feature in my list view control. Can somebody help me please?
Thanks in advance!
try setting dragmode property to vbmanual
------------------
To err is human, but to apologize frequently is embarassing.
I have set the property to vbManual, but am still not able to prevent the drag. I have tried to cancel the drag with
listview1.drag vbCancel
in the mouseDown, up and move events, still no luck!!!
You can do it in the listview's mousedown event:
Private Sub ListView1_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
Set ListView1.SelectedItem = ListView1.HitTest(x, y)
ListView1.Drag vbBeginDrag
ListView1.Drag vbEndDrag
End Sub