PDA

View Full Version : Visual Basic .net file editing


acid1
01-30-2004, 03:52 PM
Hey

I'm trying to open a file in a visual basic .net program

I'll eventually grab the text, edit it, then save it...

I'm having a problem with the grabbing the text part... here is a snippit of the code...

---------------

Dim test as String

FileSystem.FileOpen(1, "C:\Documents and Settings\acid1\Desktop\website\news.html", OpenMode.Binary)

FileSystem.get(1, test)

msgbox(test)

--------------

When i do the msgbox i don't get anything

I can however do a
MsgBox(FileSystem.LineInput(1)) and it will infact read the first line of my file

Any ideas what i'm doing wrong or how I can get the text from the file?

Thanks

acid1

vase
01-30-2004, 04:49 PM
keep your hands off the sumophlange.

acid1
01-30-2004, 06:18 PM
blah i just made a loop.... works now....

While (FileSystem.EOF(1) = False)
nextLine = FileSystem.LineInput(1)
test = test & nextLine
End While

:rolleyes

omgBruce
01-31-2004, 02:50 PM
Originally posted by vase
keep your hands off the sumophlange.

:0