IFlashBox.SaveToStream

Fore Syntax

SaveToStream(Stream: IIOStream);

Fore.NET Syntax

SaveToStream(Stream: System.IO.Stream);

Parameters

Stream is a stream in which the Flash object is saved.

Description

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

Example

Executing the example requires a form and a button positioned 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 pressing the button creates the Document object with the Flash_Document identifier in the repository. The Flash object loaded in the FlashBox1 is saved in this object.

See also:

IFlashBox