How to invoke the Windows ShortCut Dialog wizard?
function InvokeShortCutDialog(Directory : string) : boolean;
var
Reg : TRegistry;
CmdLine : string;
begin
Result := false;
Reg := TRegistry.Create;
try
Reg.Rootkey := HKEY_CLASSES_ROOT;
if Reg.OpenKeyReadOnly('.LNKShellNew') then
begin
CmdLine := Reg.ReadString('Command');
CmdLine := StringReplace(CmdLine, '%1', Directory, []);
Result := True;
WinExec(PChar(CmdLine), SW_SHOWNORMAL );
end
finally
Reg.free;
end;
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
InvokeShortCutDialog('c:Temp');
end;
| Is This Answer Correct ? | 0 Yes | 0 No |
How to Check available disk space on large drives?
'Interface not supported' . what does this error mean?
How to Move the application server to another machine?
How to convert a .dfm file to text and vise versa?
How to Use Stored Procedures ?
How to create an example of your problem for Borland Developer Support?
How to place a bitmap in a Metafile?
How to print an HTML document from inside of your application?
How to change an ISAPI DLL project to a CGI project, or vice-versa?
Where is the file dsgnintf.pas?
How to Get the size of the desktop?
How to Load a TListView component that contains SubItems?