How do I programmatically select a node in a TreeView control?

Platform: WinForms|Category: TreeView

You need to set the HideSelection property of the TreeView to false and call:

[C#]
	//Select the first node
this.treeView1.SelectedNode = this.treeView1.Nodes[0];

[VB.NET]

’Select the first node
Me.treeView1.SelectedNode = Me.treeView1.Nodes(0)