[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

VB.net check if TreeView node is at a position clicked on

Posted on 2012-04-03
2
Medium Priority
?
495 Views
Last Modified: 2012-04-03
Hi

What code would I use to see if a TreeView node is present on MouseDown
0
Comment
Question by:Murray Brown
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 38

Accepted Solution

by:
PaulHews earned 2000 total points
ID: 37803765
I think you would use TreeView.GetNodeAt method

    Private Sub TreeView1_MouseDown(sender As Object, e As System.Windows.Forms.MouseEventArgs) Handles TreeView1.MouseDown
        Dim n As TreeNode = TreeView1.GetNodeAt(e.X, e.Y)
        If n Is Nothing Then
            MsgBox("No node")
        Else
            MsgBox(n.Text)
        End If
    End Sub

Open in new window

TreeView.GetNodeAt Method
http://msdn.microsoft.com/en-us/library/1yxbz43s.aspx
0
 

Author Closing Comment

by:Murray Brown
ID: 37803847
Thanks
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

1.0 - Introduction Converting Visual Basic 6.0 (VB6) to Visual Basic 2008+ (VB.NET). If ever there was a subject full of murkiness and bad decisions, it is this one!   The first problem seems to be that people considering this task of converting…
Microsoft Reports are based on a report definition, which is an XML file that describes data and layout for the report, with a different extension. You can create a client-side report definition language (*.rdlc) file with Visual Studio, and build g…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
Suggested Courses

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question