How do I add a child in the middle of a node?

I am writing a track meet/statistics program in VB 6.  The following is the code I'm using.
    Dim fir As String, second As String, itself As String
    If Not tvw.DropHighlight Is Nothing Then
        If Left(tvw.SelectedItem, 1) = Left(tvw.DropHighlight.Text, 1) Then
        Else
            Select Case Len(tvw.DropHighlight)
                Case 1
                    tvw.DropHighlight.Text = Left(tvw.DropHighlight.Text, 1) & Right(tvw.SelectedItem, Len(tvw.SelectedItem) - 1)
                    tvw.SelectedItem = Left(tvw.SelectedItem, 1)
                Case Else
                    Set mNode = tvw.Nodes.add(tvw.DropHighlight, , , Left(tvw.DropHighlight.Text, 1) & Right(tvw.SelectedItem.Text, Len(tvw.SelectedItem.Text) - 1))
                    tvw.SelectedItem = Left(tvw.SelectedItem, 1)
            End Select
        End If
        For i = 1 To tvw.Nodes.Count
            If Len(tvw.Nodes.Item(i)) = 1 Then
                If Left(tvw.Nodes.Item(i).Text, 1) = Left(tvw.Nodes.Item(tvw.Nodes.Count).Text, 1) Then
                    If i = tvw.Nodes.Count Then
                    Else
                        tvw.Nodes.Remove tvw.SelectedItem.Index
                        Exit For
                    End If
                End If
            End If
        Next i
        Set tvw.DropHighlight = Nothing
        Set mNode = Nothing
    End If
When it adds the dragged athlete it drops in the correct spot but it adds it and makes it the last node in the list.  How do I make it the node number where I dropped it?
scottseeAsked:
Who is Participating?
 
aikimarkConnect With a Mentor Commented:
You should be able to use the  .HitTest method that will tell your program what node is below the mouse.

http://www.devx.com/vb/Article/9707/1954
0
 
aikimarkCommented:
You should be able to use the  .HitTest method that will tell your program what node is below the mouse.

http://www.devx.com/vb/Article/9707/1954
0
 
Computer101Commented:
Forced accept.

Computer101
EE Admin
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.