View Single Post
  #2  
Old 01-10-2001, 04:17 PM
The Smurf The Smurf is offline
Member
 
Join Date: Jan 2001
Posts: 40
Default RE: anyone know how to bring up control panel applets???

Use the ShellExecute API to call Rundll32 with the following parameters:

shell32.dll,Control_RunDLL ,,

cpl app can be one of the following:

AppWiz.cpl (Add/Remove programs)
Desk.cpl (Display Properties)
Inetcpl.cpl (Internet Properties)
Intl.cpl (Regional Settings)
Joy.cpl (Joystick)
Main.cpl (Mouse Properties)
Mmsys.cpl (Multimedia)
Modem.cpl (Modem)
Odbccp32.cpl (ODBC Data Source)
Password.cpl (Passwords)
Sysdm.cpl (System Properties)
Themes.cpl (Desktop Themes)
Timedate.cpl (Date/Time)
Netcpl.cpl (Network)

Applet is a zero-based number used if the app you're trying to open contains more than one applet. Page is a one-based number used if the app you're trying to open contains more than one page.

Here's an example:

ShellExecute(Self.Handle,'open','rundll32.exe','sh ell32.dll Control_RunDLL Sysdm.cpl,0,2);

-- The Smurf
Reply With Quote