How to Read info from a text file Real-Time into a control.
Posted on 2003-03-11
Using VB 6.0, do not have access to VB.Net
1) Is there a better control than an RTF Box to read large (> 5 Meg) amounts of text into.
2) Is there a control that I can append data to without having to re-load the entire set of data each time a new line is added.
3) How do I access new information in a file that is constantly changing without having to re-open/re-parse the entire file.
Ok, just a quick FYI as to why i'm asking. I'm attempting to write a Log file parser for a log that is updated in real time. In other words this program needs to be able to run and display information to my screen as the log file changes through another application.
Here's the problems:
1) The Log file can be huge - 10 - 20 meg is not uncommon.
2) This needs to run real time and not take too much time to load as this is supposed to be a "behind the scenes" part of the application. There will be other stuff the user can do while this file is being read in.
3) I'm hoping for a way to load this line by line instead of en-mass. I would prefer to be able to color each line as it is read in when displayed in an RTF Box (unless there's a better control) based upon the contents of the line.
Any information about this would be GREATLY appreciated. I have both C/C++ and VB knowledge, but I don't know C++ Windows programming well enough to create windows/items in it...so i'm stuck with VB for the interface.
I can re-load the file based on a timer event into the RTF box, but that causes an application delay every x amount of time...and this really needs to be more real time than file/open.
Any help or any information any of you could provide would be immensely helpful...thanks.