IFlashBox.SaveToStream

Fore Syntax

SaveToStream(Stream: IIOStream);

Fore.NET Syntax

SaveToStream(Stream: System.IO.Stream);

Parameters

Stream - stream, to which a Flash object is saved.

Description

The SaveToStream method saves a Flash object to the stream that is passed by the Stream parameter.

Example

Executing the example requires a form and a button on it and the FlashBox component.

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);

Var

MB: IMetabase;

MObj: IMetabaseObject;

CrInfo: IMetabaseObjectCreateInfo;

Doc: IDocument;

MemStr: IMemoryStream;

Begin

MB := MetabaseClass.Active;

CrInfo := MB.CreateCreateInfo;

CrInfo.ClassID := MetabaseObjectClass.KE_CLASS_DOCUMENT;

CrInfo.Id := "Flash_Document";

CrInfo.Name := "Flash_Document";

CrInfo.Parent := MB.Root;

CrInfo.Permanent := True;

MObj := MB.CreateObject(CrInfo).Edit;

Doc := MObj As IDocument;

MemStr := New MemoryStream.Create;

FlashBox1.SaveToStream(MemStr);

Doc.LoadFromStream(MemStr);

Dispose MemStr;

MObj.Save;

End Sub Button1OnClick;

After executing the example clicking the button creates the Document object with the Flash_Document identifier in the repository. The Flash object loaded in FlashBox1 is saved in this object.

See also:

IFlashBox