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 Create Non-Visual Components Without Icons ?
How to open or create a project using the TReport component?
How to Extract RGB components of a color?
Does Delphi support the back-end?
How many tables can be connected with joins in oracle at a time?
Why do I get exception messages even though I am in protected code?
How can I create an identical binary executable in Delphi?
What is DBGo?
How to Use InvalidateRect()to repaint the entire form?
How to Return application's exit code?
How to get function params from a dll?
How to Write a raw string of data to the printer?