I am try to find out how to check if the mouse button is held down.
The e.click =2 works, it allows me to enter the double click double.
I what the single click to do some different and then a click and
hold
to allow the drag and drop
I have looked at the mouseUp events be can not get it to work, when i
click and release my code does not enter mouseUP event?
See above for MouseDown Event
any ideas
Thanks
Barry
Private Sub tvNone_MouseDow n(ByVal sender As Object, ByVal e As
System.Windows. Forms.MouseEven tArgs) Handles tvNone.MouseDow n
Select Case e.Button.ToStri ng
Case "Left"
If e.Clicks = 2 Then Exit Sub '# Exits to Double
click
event
If tvNone.Selected Node Is Nothing Then Exit Sub '#
Exits if nothing is selected
'# Enable Treeview that node can be dropped into
Me.tvNone.Allow Drop = True
Me.tvRFQ.AllowD rop = True
Me.tvEnquiry.Al lowDrop = False
Me.tvEval.Allow Drop = False
Me.tvRPT.AllowD rop = False
Me.tvPO.AllowDr op = False
Me.tvRAS.AllowD rop = False
Me.tvITD.AllowD rop = False
Me.tvRAD.AllowD rop = False
'# Get Selected node and node index
Dim DraggedNode As String = tvNone.Selected Node.Text
Dim DraggedNodeInde x As Integer =
tvNone.Selected Node.Index
'# Send info to DragDrag events
tvNone.DoDragDr op(Chr(40) & DraggedNode & Chr(41) &
Chr(40) & 0 & Chr(41), DragDropEffects .Move)
'# Remove Selected Node
tvNone.Nodes.Re moveAt(DraggedN odeIndex)
Case "Middle"
Case "Right"
End Select
End Sub
The e.click =2 works, it allows me to enter the double click double.
I what the single click to do some different and then a click and
hold
to allow the drag and drop
I have looked at the mouseUp events be can not get it to work, when i
click and release my code does not enter mouseUP event?
See above for MouseDown Event
any ideas
Thanks
Barry
Private Sub tvNone_MouseDow n(ByVal sender As Object, ByVal e As
System.Windows. Forms.MouseEven tArgs) Handles tvNone.MouseDow n
Select Case e.Button.ToStri ng
Case "Left"
If e.Clicks = 2 Then Exit Sub '# Exits to Double
click
event
If tvNone.Selected Node Is Nothing Then Exit Sub '#
Exits if nothing is selected
'# Enable Treeview that node can be dropped into
Me.tvNone.Allow Drop = True
Me.tvRFQ.AllowD rop = True
Me.tvEnquiry.Al lowDrop = False
Me.tvEval.Allow Drop = False
Me.tvRPT.AllowD rop = False
Me.tvPO.AllowDr op = False
Me.tvRAS.AllowD rop = False
Me.tvITD.AllowD rop = False
Me.tvRAD.AllowD rop = False
'# Get Selected node and node index
Dim DraggedNode As String = tvNone.Selected Node.Text
Dim DraggedNodeInde x As Integer =
tvNone.Selected Node.Index
'# Send info to DragDrag events
tvNone.DoDragDr op(Chr(40) & DraggedNode & Chr(41) &
Chr(40) & 0 & Chr(41), DragDropEffects .Move)
'# Remove Selected Node
tvNone.Nodes.Re moveAt(DraggedN odeIndex)
Case "Middle"
Case "Right"
End Select
End Sub
Comment