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 |
With what commands you can Delete a directory and all the directories with files?
How to Print a TStringGrid / TDBGrid?
How to Get the local internet machine name and IP address?
How to dial out through the modem under Win32?
How to Embede a page break in the Rich Edit control ?
Is Visibroker for C++ 4.5 supported with Delphi 6?
How to Set break on exception in Delphi 4?
How to Change the default width/height of the editor?
What are IDAPI and SQL links ?
How to Stop TScrollbar button from blinking ?
How is the memory used within an object in delphi?
How many tables can be connected with joins in oracle at a time?