Click here to Skip to main content
15,911,711 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
See more:
Hello,
I have made my program to open .abc files.My program needs some info from every file it opens to work. How do i do that so my program get info from the file it opens.Please Help!
Posted
Updated 11-Dec-11 8:47am
v3
Comments
Manfred Rudolf Bihy 11-Dec-11 15:21pm    
"Some info" ... Anything else you want to tell us?
[no name] 11-Dec-11 15:54pm    
Like Manfred R. Bihy wrote, one needs some more info about what info you need from the file....e.g. create/mdfy date, size, ....
Juljano 11-Dec-11 16:12pm    
i want to save a listbox's items into a .txt file or something then i want my program to open that file and get the items that are in it and use them ..

1 solution

you first need to import io streams this goes before you declare your module
VB
imports system.io

You then use an io streamreader to read the abc files.
VB
Dim reader As New StreamReader("url")
Dim str As String
str = reader.ReadToEnd()
reader.Close()
reader = New StreamReader("url")
str = reader.ReadToEnd()
reader.Close()

Replace url with something like C:\users\1.abc
Hope this is what you were looking for.
James
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900