CreateFromFile(FileName: String);
CreateFromFile(FileName: String);
FileName. The path to the Windows metafile and its name.
The CreateFromFile constructor creates a new Windows metafile from the file specified in the FileName parameter.
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.
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: