vbdotnetxt
Newcomer
- Joined
- Apr 19, 2006
- Messages
- 6
I have a RichTextBox control on my form1. I have two strings called firstStr and secondStr.
firstStr = "(123456)"
secondStr = "(1234567890)"
I want to select 123456 from the secondStr.
This is how I wanted to do it and print it to the RichTextBox:
but it doesn't work
this doesn't work either:
I want to eventually compare the selected text with firstStr.
How can I do that?
firstStr = "(123456)"
secondStr = "(1234567890)"
I want to select 123456 from the secondStr.
This is how I wanted to do it and print it to the RichTextBox:
Visual Basic:
secondStr.Select(1,7)
RichTextBox.Text = secondStr.SelectedText
but it doesn't work
this doesn't work either:
Visual Basic:
secondStr.SelectionStart = 1
secondStr.SelectionLength = 7
RichTextBox.Text = secondStr.SelectedText
I want to eventually compare the selected text with firstStr.
How can I do that?