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 custom draw menu items?
How to Change font color on standard win controls?
I just bought Delphi. Where are the language and library reference manuals?
How to Provide lookup capability?
How to send a response early in a web application action?
Does Delphi support the back-end?
How to Determine if you have Delphi v3.02 installed?
Explain the findclose method?
'Cannot Load IDAPI Service Library' error. What does this error mean?
Where can I get a copy of Delphi?
How to turn off ISAPI DLL caching on Windows 2000 and IIS5 ?
How to launch a control panel applet?