GxIcon.CreateFromStream

Fore Syntax

CreateFromStream(Stream: IIOStream);

Fore.NET Syntax

CreateFromStream(Stream: System.IO.Stream);

Parameters

Stream. The stream, from which the icon is loaded.

Description

The CreateFromStream constructor creates an icon from the stream.

Fore Example

Function GetIconFromStream(IconStream: IIOStream): IGxIcon;
Var
    OutIcon: IGxIcon;
Begin
    If IconStream.Size <> 0 Then
        OutIcon := New GxIcon.CreateFromStream(IconStream);
        Return OutIcon;
    Else
        Return Null;
    End If;
End Function GetIconFromStream;

This function returns the icon obtained from the stream.

Fore.NET Example

Imports System.IO;
Imports Prognoz.Platform.Interop.Drawing;

Function GetIconFromStream(IconStream: Stream): GxIcon;
Var
    OutIcon: GxIcon;
Begin
    If IconStream.Length <> 0 Then
        OutIcon := New GxIconClass();
        OutIcon.CreateFromStream(IconStream);
        Return OutIcon;
    Else
        Return Null;
    End If;
End Function;

This function returns the icon obtained from the stream.

See also:

GxIcon