-
My problem is that I have a text file thats around 6MB and its going to be getting bigger everyday, its a log file for a web server. I've tried to load it into a vb using the standard Open then line input stuff but vb either runs out of mem or hangs forever. If anyone knows code that will make it load a lot faster please post it or send me and email, [email protected]. Something like wordpad would work great, because it loads the file in like 5 seconds, any help would be appreciated, thanks.
-
Why don't you use the RichTextBox control? It can hold up to 2 GB.
RichTextBox1.LoadFile "C:\myfile.txt", rtfRTF 'or rtfText for regular text files
RichTextBox1.SaveFile "C:\myfile.txt", rtfRTF 'or rtfText for regular text files
..just a suggestion :rolleyes:.
-
is there a way to show the progress of the file being loaded in the rich text box?
-
I think you can open the file binary... then get it in chunks and then calculate the loaded part and the filesize to show the progress.
Use the RichTextBox as Matthew said, but open the file for binary.
See kedaman's site for more info about Files in VB
http://www.kedaman.com < hey keda, you gotta pay me for all this advertising! ;)
-
when I open it as binary almost all the characters turn into ?'s.