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 the Lookup method to return values from multiple columns ?
Why won't the virtual key codes work in program?
How to get Table data subset through IProvider ?
How to Determine minor version number?
How to Use InvalidateRect()to repaint the entire form?
I just bought Delphi. Where are the language and library reference manuals?
How to change file attributes programmatically?
How to Retrieve the line number that a memo's cursor is on?
How to move Client Objects to a different AS/400?
How to launch a control panel applet?
Can ALTER TABLE statment on Paradox tables removes passwords ?
How to Pass TPrinter handle to GetDeviceCaps() ?