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 Use an animated cursor?
How to Copy a information from one memo field to another using TBlobStream ?
How to Retrieving the program that is associated with a given extension?
How to Check drive ready status?
What are the problems faced by memory leaks?
'Interface mismatch. Engine version different' . what does this error indicates?
'Missing Data Provider or Data Packet' . what does this error mean?
How to Propagate constraints from middle-tier to client?
How do I close a modal form? For that matter, what is the best way to close any form?
How to get a TRichEdit to scroll in code?
How to Set a form's maxwidth in code?
Can I use the ODBC drivers that I got with ?