FMX.Forms.TFormSaveState.Stream

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

property Stream: TMemoryStream read GetStream;

C++

__property System::Classes::TMemoryStream* Stream = {read=GetStream};

Properties

Type Visibility Source Unit Parent
property public
FMX.Forms.pas
FMX.Forms.hpp
FMX.Forms TFormSaveState

Description

It is an instance of TMemoryStream which contains the save state data of the form.

The Stream property contains data that was saved during the last OnSaveState event.

You can read or write to the Stream property at any time, but the reading should preferably occur during the OnCreate event of the form, and the writing during the OnSaveState event of the form.

The data saved here will remain even when the application is restarted. This data will be available until you explicitly clear it using the Clear method, or you call the SetBlock method with the block dataset to nil.

Tip: Helper classes, such as TBinaryReader and TBinaryWriter, can be used with this stream as parameter to assist saving information such as numeric and string values.

See Also