[RESOLVED] Add event hangler
Hi in VB.NET Express I am trying to make a notes program what it does is aload rtf files from a folder and adds tabs and a ritchtext box. This the code I am using
Code:
Private Sub NewNote(ByVal Text As String, Optional ByVal PageData As String = "")
Dim tp As New TabPage
Dim rt As New RichTextBox
'Set tabpage caption
tp.Text = Text
rt.Dock = DockStyle.Fill
rt.BorderStyle = BorderStyle.None
rt.Parent = tp
'Check if we have a filename to load.
If Not String.IsNullOrEmpty(PageData) Then
rt.LoadFile(PageData)
End If
'Add new tabpage
sTab1.TabPages.Add(tp)
End Sub
My problum is how can I add an event for TextChanged of the richedit bxoes. I know in C# you can use something like this
Code:
rt.TextChanged += new System.EventHandler(TextChange);
but I duno how you do it in VB can someone please help I used to use VB6 years back then moved to C# and now moved to VB.NET so eveything is sort of new to me.