Private Sub tv1_NodeMouseClick(sender As Object, e As System.Windows.Forms.TreeNodeMouseClickEventArgs) Handles tv1.NodeMouseClick
If e.X < e.Node.Bounds.Left Then
Debug.Print("Img Click")
Else
Debug.Print("Txt Click")
End If
End Sub
The
e.X
is the X-coordinate (horizontal position) of the mouse click. the
e.Node.Bounds
is the bounds (left/right/height/width) of the node text. So if the X coordinate is less than the node text bounds left-most position, the click occurred in the image area (to the left) of the node.