 <pre><code>textBox1.Enter += new EventHandler(txtSearch_TextChanged); private void txtSearch_TextChanged(object sender, EventArgs e) { foreach (TreeNode node in this.treeView1.Nodes) { if (node.Text.ToUpper().Contains(this.textBox1.Text.ToUpper())) { treeView1.Select(); // First give the focus to the treeview control, //doing this, the control is able to show the selectednode. treeView1.SelectedNode = node; break; } } </code></pre>