yeah i've got it opening a *.cpl file !


Posted by Delphilover on August 21, 2001 at 22:42:54:

hi,

first write a function before the menuevent you have to include the full path to the *.cpl files i found this in Delphi 5 enterprise help files

function RunControlPanelApplet(const sAppletFileName:string):integer;
begin
  Result :=WinExec(PChar('c:\windows\Rundll32.exe shell32.dll,'
    + 'Control_RunDLL' + sAppletFileName), SW_SHOWNORMAL);
end;

procedure TForm1.OptionsClick(Sender:TObject);
begin
  RunControlPanelApplet('c:\windows\system\inetcpl.cpl');
end;

end.

Modify the paths matching your own system !! if you don't know the correct path you gotta search for it first ;-)

Delphilover


Related Articles and Replies


[ Related Articles and Replies ] [ DelphiLand Forum ] [ Delphi Tutorials ]