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 Select a cell in a DBGrid ?
How to drop down a menu Programmatically ?
How to Retrieving the program that is associated with a given extension?
How to change an ISAPI DLL project to a CGI project, or vice-versa?
what are Hetergenious joins ?
How to Perform undo on an edit control?
Why Delphi drawing functions draw one pixel short?
How to add system menu items to a form ?
How to Converta RGB color to a CMYK color?
What is the process of exception handling in delphi?
How to use a true DWORD value passed to Delphi application?
what are the Font problems on NT 4.0?