Flash Games
 FAQ   Search   Memberlist   Usergroups   Register  Profile   Log in to check your private messages   Log in 


How to create the find option similar to notepad..?urgent



 

Post new topic   Reply to topic  
   DEVPPL Forum Index -> Visual Basic Forum
View previous topic :: View next topic  
Author Message
blackwidow



Joined: 13 May 2008
Posts: 1

PostPosted: Tue May 13, 2008 6:52 am    Post subject: How to create the find option similar to notepad..?urgent Reply with quote

i have created the code..but it selects only the first text..for example
if I enter HelloWorldHello and request Hello to be selected...only the first part is selected..
Option Explicit

Private Sub Command1_Click()
Dim i As Integer
i = InStr(1, Text1.Text, Text2.Text)
If i = 0 Then
MsgBox "String not found"
Else
Text1.SetFocus
Text1.SelStart = i - 1
Text1.SelLength = Len(Text2.Text)
End If
End Sub
Back to top
View user's profile Send private message
sendtoanurag



Joined: 18 Mar 2008
Posts: 28

PostPosted: Mon May 19, 2008 5:52 am    Post subject: Re: How to create the find option similar to notepad..?urgent Reply with quote

Coz that's what u,ve written
The variable i here selects the first instance of Hello and selects only that
In fact write the code to loop thru varuable
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    DEVPPL Forum Index -> Visual Basic Forum All times are GMT + 1 Hour
Page 1 of 1

 
 
Welcome to DEVPPL.com
You are not logged in, which means that you can't post in the forums.
Click here to Register

If you are a current member here on DEVPPL, please login below:

User: Pass:
Log me on automatically each visit:

 


Powered by phpBB © 2001, 2005 phpBB Group - Modified by DEVPPL

Flash Games - Sitemap