CreateFromFile(FileName: String);
CreateFromFile(FileName: String);
FileName. The path and the name of the file that contains the icon.
The CreateFromFile constructor creates an icon from the specified file.
Function GetIconFromFile(FileName: String): IGxIcon;
Var
OutIcon: IGxIcon;
Begin
If File.Exists(FileName) Then
OutIcon := New GxIcon.CreateFromFile(FileName);
Return OutIcon;
Else
Return Null;
End If;
End Function GetIconFromFile;
The function returns the icon obtained from the file, path to which is specified as an input parameter.
Imports System.IO;
Imports Prognoz.Platform.Interop.Drawing;
Function GetIconFromFile(FileName: String): GxIcon;
Var
OutIcon: GxIcon;
Begin
If File.Exists(FileName) Then
OutIcon := New GxIconClass();
OutIcon.CreateFromFile(FileName);
Return OutIcon;
Else
Return Null;
End If;
End Function;
The function returns the icon obtained from the file, path to which is specified as an input parameter.
See also: