| RTL reference|Glossary|Tips/Tricks|FREE App/VCL|Essentials|Books|Link Back |
| Locate, Display and Execute Control Panel Applets | |||||||||||||||||||||||||||
| Page 3: Executing Control Panel Applets from Delphi | |||||||||||||||||||||||||||
Interested in Delphi code to mimic the Windows Control Panel folder behavior? In this article you can learn how to find CPL files, how to extract description, name and even the applet icon. Even more, learn how to execute applets from your applications.
Locating Control Panel applications ... done! What first comes to mind is using the ShellExecute API call. Unfortunately, Control Panel Applets are not applications and cannot be opened using the ShellExecute call in a similiar way we would use it to start Windows Explorer, for example.
Control_RunDLL
The CmdLine will look different for each individual applet. Also, there is a tab number option that can be used with some applets to show a particular tab on the Applet.
Here are some examples:
Here's how the call to Control_RunDLL looks inside our Delphi clone of the Control Panel folder:
Note: the above procedure handles the OnClick event of the btnExecute TButton we added to our form. Also, the above code cannot be used to show a particular tab on the Applet.
ShellExecute?
Then call it like:
And here's the Control Panel Applet, called from Delphi code:
![]() That's it! Of course, don't forget to download all the source code for this project... Next page > Full Project source code > Page 1, 2, 3, 4 |
|||||||||||||||||||||||||||
All graphics (if any) in this feature created by Zarko Gajic.
| More Delphi |
|
· Learn another routine every day - RTL Quick Reference. · Download free source code applications and components. · Talk about Delphi Programming, real time. · Link to the Delphi Programming site from your Web pages. · Tutorials, articles, tech. tips by date: 2003|2002|2001|2000|1999|1998 or by TOPIC. |
| Stay informed with all new and interesting things about Delphi (for free). |
|
|
| Got some code to share? Got a question? Need some help? |


