Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
[navy][i]// for automatic syntax highlighting see faq102-6487[/i][/navy]
[b]uses[/b]
Windows, ShlObj, ComObj;
[b]procedure[/b] CreateShortCut(PathObj, PathLink, Desc, Param: String);
[b]var[/b]
IObject: IUnknown;
SLink: IShellLink;
PFile: IPersistFile;
[b]begin[/b]
IObject := CreateComObject(CLSID_ShellLink);
SLink := IObject [b]as[/b] IShellLink;
PFile := IObject [b]as[/b] IPersistFile;
[b]with[/b] SLink [b]do[/b]
[b]begin[/b]
SetArguments(PChar(Param));
SetDescription(PChar(Desc));
SetPath(PChar(PathObj));
[b]end[/b];
PFile.Save(PWChar(WideString(PathLink)), False);
[b]end[/b];
[b]begin[/b]
CreateShortCut([teal]'c:\myprog.exe'[/teal], IncludeTrailingPathDelimiter(GetEnvironmentVariable([teal]'userprofile'[/teal]))
+ [teal]'SendTo\MyShortcut.lnk, '[/teal][teal]', '[/teal][teal]');
[/teal][b]end;[/b]