Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Get some data from a text file

Status
Not open for further replies.

Horowitz

Programmer
Jan 29, 2005
30
GR
Hi,
I want the code snipset that when i click a button a messagebox will appear display to me the 3rd line or the file "c:\abc.txt" (using streamreader???;don't know)

Tnx
 
you don't want much.

Code:
Dim str As New System.IO.StreamReader("c:\abc.txt")
str.ReadLine()
str.ReadLine()
MessageBox.Show(str.ReadLine, "3rd line", MessageBoxButtons.OK, MessageBoxIcon.None, MessageBoxDefaultButton.

Christiaan Baes
Belgium

If you want to get an answer read this FAQ faq796-2540
There's no such thing as a winnable war - Sting
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top