|
-
Jan 5th, 2003, 02:40 AM
#1
Thread Starter
Addicted Member
Streaming Text
Thanks for all the help tonight guys. I'm trying to open a text file and have portions of the text fill text controls on my form. What's the best way to go about opening a text file and having it read up to a certain point. For example here is a text file:
This is line 1 of my text file
this is the second line
The third line may look like this.
And the forth is here.
How can I open a file and have it put whatever is inbetween the word "third" and "forth" and put it in a control?
Thank again for the help. I'm quite the beginner with text modification and VB.NET
-- Ethan --
VB6, VB.NET, C#, SQL, XML, ADO.NET, ASP.NET, HTML.
MCP & A+ Certified. Looking for a job in the Seattle, WA area.
-
Jan 5th, 2003, 02:43 AM
#2
Sleep mode
Did you search the Forum ? It's heavily asked about that.
-
Jan 5th, 2003, 03:04 AM
#3
Thread Starter
Addicted Member
I have done a little searching and found some stuff but my question is a little different. Here's an example of almost exactly what the text file will look like:
#HELP
-1 TEST~
~
-1 MERC~
~
92 MERC~
~
40 SHIELD 'STONE SKIN'~
~
0 $~
Ok... to make things easier to understand, $ means the end of the file and #HELP is the start. Each number represents a "Level" and each word or set of words is a "Keyword". Basically, I need to find a way to get each "Keyword" into a big drop-down combo box. Then when I select the "Keyword", the corresponding "Level" will appear in a text box next to it.
Where's a good place to start. I've looked a little into the following example but I'm not sure it's the best option for me. Let me know what you all think...
VB Code:
dim SampleStr as String="001,Mickey Mouse ,5000,200"
dim parts() as String=SampleStr.Split(",")
Msgbox(parts(0))
Msgbox(parts(1))
Msgbox(parts(2))
Msgbox(parts(3))
-- Ethan --
VB6, VB.NET, C#, SQL, XML, ADO.NET, ASP.NET, HTML.
MCP & A+ Certified. Looking for a job in the Seattle, WA area.
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
|