GxMetafile.CreateFromFile

Fore Syntax

CreateFromFile(FileName: String);

Fore.NET Syntax

CreateFromFile(FileName: String);

Parameters

FileName. The path to the Windows metafile and its name.

Description

The CreateFromFile constructor creates a new Windows metafile from the file specified in the FileName parameter.

Fore Example

Function GetMetafileFromFile(FileName: String): IGxMetafile;
Var
    Mtf: IGxMetafile;
Begin
    If File.Exists(FileName) Then
        Mtf := New GxMetafile.CreateFromFile(FileName);
        Return Mtf;
    Else
        Return Null;
    End If;
End Function GetMetafileFromFile;

The function returns the metafile obtained from the file, path to which is specified as an input parameter.

Fore.NET Example

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

Function GetMetafileFromFile(FileName: String): GxMetafile;
Var
    Mtf: GxMetafile;
Begin
    If File.Exists(FileName) Then
        Mtf := New GxMetafileClass_2();
        Mtf.CreateFromFile(FileName);
        Return Mtf;
    Else
        Return Null;
    End If;
End Function;

The function returns the metafile obtained from the file, path to which is specified as an input parameter.

See also:

GxImage