By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,524 Members | 1,589 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,524 IT Pros & Developers. It's quick & easy.

VB6 had a span method, how do you do this in vb.net

P: n/a
In vb6 you could find text then span to include all text to a given point.
Public Sub Findd(RTF As RichTextBox, Find As String)

RTF.Find (Find)
textfind = RTF.Find(Find)
If textfind <> -1 Then
foundtxt = True
RTF.Span "@", True, True
RTF.SetFocus
Exit Sub
Else
foundtxt = False
Exit Sub
End If

End Sub
How do you do this or somthing like it in VB.net?
Nov 21 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
from
http://www.dotnet4all.com/Dot-Net-Bo...an-method.html
You have to get the ITextDocument of the richtextbox and call the
Selection.Expand(tomWord) method ,see the msdn docs for ItextDocument
interface.

HTH
rawCoder

"Servoris" <Se******@discussions.microsoft.com> wrote in message
news:B3**********************************@microsof t.com...
In vb6 you could find text then span to include all text to a given point.
Public Sub Findd(RTF As RichTextBox, Find As String)

RTF.Find (Find)
textfind = RTF.Find(Find)
If textfind <> -1 Then
foundtxt = True
RTF.Span "@", True, True
RTF.SetFocus
Exit Sub
Else
foundtxt = False
Exit Sub
End If

End Sub
How do you do this or somthing like it in VB.net?

Nov 21 '05 #2

P: n/a
Thanks for the responce. I have seen this before and I have not been able to
find more info. I am not a pro. programmer, just a hobbyist. I need to see
examples to understand.

"rawCoder" wrote:
from
http://www.dotnet4all.com/Dot-Net-Bo...an-method.html
You have to get the ITextDocument of the richtextbox and call the
Selection.Expand(tomWord) method ,see the msdn docs for ItextDocument
interface.

HTH
rawCoder

"Servoris" <Se******@discussions.microsoft.com> wrote in message
news:B3**********************************@microsof t.com...
In vb6 you could find text then span to include all text to a given point.
Public Sub Findd(RTF As RichTextBox, Find As String)

RTF.Find (Find)
textfind = RTF.Find(Find)
If textfind <> -1 Then
foundtxt = True
RTF.Span "@", True, True
RTF.SetFocus
Exit Sub
Else
foundtxt = False
Exit Sub
End If

End Sub
How do you do this or somthing like it in VB.net?


Nov 21 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.