Show text file in a form.  
Author Message
Aleniko29139





PostPosted: Visual FoxPro General, Show text file in a form. Top

Hi;

I need to show the user a text file on a form. Is there a better way of doing this than using low level file commands to fetch the textfile and then use an editBox

The size of the text file can't be very large - 10-20K or so.

Thanks.


Visual FoxPro1  
 
 
Alex Feldstein





PostPosted: Visual FoxPro General, Show text file in a form. Top

To show, an EditBox is probably the best suited control. You might like to make it readonly with a light gray background.

To gather data, the easiest and fastest is to load the file's contents to a memory variable, or to a property, or you could put it in a cursor or table's field, and bind it to the editbox control.

cFileContents = FileToStr(full_path_and_filename)


 
 
Aleniko





PostPosted: Visual FoxPro General, Show text file in a form. Top

FiletoStr() is what I was looking for. Thx.