|
-
Jul 1st, 2001, 08:44 AM
#1
Thread Starter
Fanatic Member
How to Search in A txt file?
Hi all, got any idea of Search for a Phrase in a file? Perhaps a sentence?

prog_tom
JOIN THE REVOLUTION!!!! Dual T3 backedup science community.
http://physics.sviesoft.com/forum
-
Jul 1st, 2001, 09:32 AM
#2
VB Code:
Dim sText As String
'Open the file into a string
Open "MyFile.txt" For Input As #1
sText = Input(LOF(1), 1)
Close #1
'Search the string
If InStr(1, sText, "My Sentence") <> 0 Then MsgBox "Sentence found"
-
Jul 1st, 2001, 09:50 AM
#3
Thread Starter
Fanatic Member
Thanks superman:)
Thank you very much bro. do You know how old I am?

prog_tom
JOIN THE REVOLUTION!!!! Dual T3 backedup science community.
http://physics.sviesoft.com/forum
-
Jul 1st, 2001, 09:52 AM
#4
Thread Starter
Fanatic Member
How to make FOcus?
How do you like Make your form focus?
I tried to use me.setfocus, doesn't even work, Also
me.show vbmodal, it does the job but it's so messy, I mean when I unload it it gets a lot of errors sometimes... Any other ways?

prog_tom
JOIN THE REVOLUTION!!!! Dual T3 backedup science community.
http://physics.sviesoft.com/forum
-
Jul 1st, 2001, 10:00 AM
#5
The following are different methods (which all work fine for me):
Show, ZOrder, SetFocus, SetActiveWindow (API), and SetForegroundWindow (API)
What routine is the code in?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|