PC Review


Reply
Thread Tools Rate Thread

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

 
 
=?Utf-8?B?U2Vydm9yaXM=?=
Guest
Posts: n/a
 
      10th Jun 2005
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?
 
Reply With Quote
 
 
 
 
rawCoder
Guest
Posts: n/a
 
      10th Jun 2005
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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?



 
Reply With Quote
 
 
 
 
=?Utf-8?B?U2Vydm9yaXM=?=
Guest
Posts: n/a
 
      10th Jun 2005
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" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > 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?

>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: If you had to move from VB6... Mike Williams Microsoft VB .NET 0 24th Feb 2010 03:32 PM
Re: Holidays span two days when they should span one Diane Poremsky {MVP} Microsoft Outlook 7 28th Apr 2008 10:50 PM
Life span of VB6? johnb41 Microsoft VB .NET 16 7th Jan 2005 03:40 PM
<span></span> =?Utf-8?B?RGVicmE=?= Microsoft Frontpage 9 1st Dec 2004 11:19 PM
I had to re-install Outlook; how can i view the mail i had saved ? jack Microsoft Outlook Discussion 2 14th Oct 2003 05:51 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:24 PM.