Try changing the declaration to this:
[highlight=vb]Private WithEvents comp As DigitalRune.Windows.TextEditor.TextEditorControl[/highlight]
And in Form1's load event, initialize the comp:
[highlight=vb]comp = Me.TabControl1.SelectedTab.Controls(0)[/highlight]
If the above line doesn't works, try casting:
[highlight=vb]Dim TxtEd As DigitalRune.Windows.TextEditor.TextEditorControl = Me.TabControl1.SelectedTab.Controls(0)[/highlight]