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 Place a grid in edit mode programatically?
Does Delphi support the back-end?
Can a Delphi Application Connect to an InterBase Database on Any Platform?
How to Get values in a TDBGrid before they are posted?
How to Send an image to the printer ?
How to Get the time and date in Universal Time ?
I am trying to call from Delphi and it GPFs. Whats up?
How to get a TRichEdit to scroll in code?
How to Trapp non client areas ?
How to Display documents in the default browser?
what are the Font problems on NT 4.0?
How to create an icon from a bitmap?