

Multi-Data FilesIf you need to do your own custom multi-Data file, there is not much to show you how to do that in the Help, Demos and Delphi books. But what if you need to make your own custom data storage file containing several different variable types and program dependent changing amounts of data? You can use TFileStream to do many File Writing and Reading operations, most of the Examples given in the Help and Books just do a single Data Type write and read to file. Alot of the methods used with AssignFile( ) go back to TuboPascal, so TFileStream gives you some more file options and is a wrapper for the API functions like CreateFile( ), WriteFile( ), CloseHandle( ) and other file functions. According to the Delphi Help the TFileStream is a more recent file component. You can create Text, Typed and UnTyped files with these methods and do alot of file read-write operations. Most Delphi users are taught how to use the Delphi "File management routines" with AssignFile(var F FileName: string),, Reset( ),, Readln( ) and CloseFile( ).

A TBitmap has a "SaveToFile" method, and so do several other VCL Objects. A TMemo has it's text as a "Lines" property which is a TStrings Class, that has a "SaveToFile" method. VCL File MethodsWhen you want to save something to a Disk File, the Delphi VCL offers you a "SaveToFile" method for many of its Objects that users would normally want to save.
