Delphi Pages Forums

Delphi Pages Forums (http://www.delphipages.com/forum/index.php)
-   General (http://www.delphipages.com/forum/forumdisplay.php?f=2)
-   -   anyone know how to bring up control panel applets??? (http://www.delphipages.com/forum/showthread.php?t=18294)

paulholden 01-10-2001 02:01 PM

anyone know how to bring up control panel applets???
 
hi, first question on this forum, just wondering if anyone can help me with this;
how can you bring up the control panel applets in your program?? like the display properties, and time/date and stuff like that??
thanks alot to anyone who could answer. please email me with some help paulhuk@hotmail.com
THANKS!!!!!!

paul

The Smurf 01-10-2001 04:17 PM

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>,<applet>,<page>

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

PoseFant 01-11-2001 05:05 AM

RE: anyone know how to bring up control panel applets???
 
Or ...

ShellExecute(Application.Handle,'OPEN','CONTROL',' NCPA.CPL',NiL,1);

Where the network dialog executes.


Regards

/Filip


All times are GMT. The time now is 07:53 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2019, vBulletin Solutions, Inc.