Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

TreeViewHitTestInfo Class

Contains information about an area of a TreeView control or a TreeNode.

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in system.windows.forms.dll)

public class TreeViewHitTestInfo
public class TreeViewHitTestInfo
public class TreeViewHitTestInfo
Not applicable.

The TreeViewHitTestInfo is returned by the TreeView class when the HitTest method is called.

The following code example demonstrates how to use the TreeViewHitTestInfo class. To run this example, paste the following code into a Windows Form that contains a TreeView control named treeView1, and populate the TreeView with items. Ensure that treeview1 and the MouseDown event for the form are associated with the HandleMouseDown method.

void HandleMouseDown(object sender, MouseEventArgs e)
{
    TreeViewHitTestInfo info = treeView1.HitTest(e.X, e.Y);
    if (info != null)
        MessageBox.Show("Hit the " + info.Location.ToString());
}

System.Object
  System.Windows.Forms.TreeViewHitTestInfo

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

Show:
© 2014 Microsoft