Working with Files

Text Control uses 7 different file formats:

An example of how to use the native file format has already been presented in the previous chapter. Using RTF, HTML, Word or unformatted text is just as simple: Just specify the format you want to use as a parameter of the Load or Save method.

Using RTF, HTML, Word and unformatted text, you can only read or write the contents of a single Text Control from or to a file. Using the native file format, however, you can write a file header prior to saving the Text Control data, or even write the contents of several Text Controls to one file.

The Forms1 sample program, which is described in the section Using Multiple Controls, shows you how to write the contents of multiple Text Controls to a single file. The MDIDemo sample shows you how to write a file header prior to the Text Control's data and how to use RTF, HTML, Word and unformatted text.