After selecting something from a Treeview, how do I shift focus to something else? Here's the code:
VB Code:
  1. Private Sub TreeView1_AfterSelect(ByVal sender As System.Object, ByVal e As System.Windows.Forms.TreeViewEventArgs) Handles TreeView1.AfterSelect
  2.         Try
  3.             CodeDirectory = e.Node.Parent.Text
  4.             code = "code\" & CodeDirectory & "\" & e.Node.Text & ".rtf"
  5.             rtbcodewindow.LoadFile(code, RichTextBoxStreamType.RichText)
  6.         Catch ex As Exception
  7.             'MessageBox.Show(ex.Message)
  8.         End Try
  9.         [b]rtbcodewindow.Focus()[/b]
  10.     End Sub
I thought rtbcodewindow.Focus() would automatically shift the focus to the RichTextBox called rtbcodewindow, but it doesn't.

Anyone any ideas?