PDA

Click to See Complete Forum and Search --> : Disable Drag Drop in List view control


VBNewB
Jan 9th, 2000, 02:45 PM
I need to disable drag and drop feature in my list view control. Can somebody help me please?

Thanks in advance!

Chuck Sweet
Jan 9th, 2000, 10:04 PM
try setting dragmode property to vbmanual

------------------
To err is human, but to apologize frequently is embarassing.

VBNewB
Jan 10th, 2000, 03:03 PM
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!!!

bchai
Aug 25th, 2000, 01:46 PM
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