Mega Code Archive

 
Categories / Delphi / API
 

How call a cpl application from delphi

In this exaple we explain how to call the mmsys.cplဠfrom delphi using the ShellExecute procedure. The mmsys.cpl is the multimedia system from control panel. To call a cpl application you need to execute the 'rundll32.exe' with a param that is the name of the cpl that you need. Ex. you have a Tform with a btn : Sample Code : implementation {$R *.dfm} uses shellapi; procedure TForm1.Button1Click(Sender: TObject); begin ShellExecute(Form1.Handle, nil, 'rundll32.exe','shell32.dll,Control_RunDLL mmsys.cpl', nil, SW_SHOW); end; end.