" Just Me" <gr****@a-znet.com> schrieb:
With a TreeView control and a MouseHover event
is there a way to determine which node we are hovering over?
\\\
Private Sub TreeView1_MouseMove( _
ByVal sender As Object, _
ByVal e As MouseEventArgs _
) Handles TreeView1.MouseMove
Static LastNode As TreeNode
Dim CurrentNode As TreeNode = _
Me.TreeView1.GetNodeAt(e.X, e.Y)
If Not CurrentNode Is LastNode Then
LastNode = CurrentNode
If Not CurrentNode Is Nothing Then
Me.Text = CurrentNode.Text
Else
Me.Text = "(no node hovered)"
End If
End If
End Sub
///
--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>