The following commands show how to use rundll32.exe to invoke these applets. Control panel applets have the extension *.cpl. Most of the examples come from the shell32.dll, but there are a few other goodies in the list.
These commands simply call up dialogs. They do not cause any changes to be made to the user's computer. The user can make changes in the dialogs, or cancel them.
Example Program
The example runs the display settings dialog. The applet is "desk.cpl".
Print"Showing Display Settings Properties."'To Show the Display Settings Propertiesrun"rundll32.exe shell32.dll Control_RunDLL desk.cpl"Print"Done"
The Command List
The following RUN commands are meant to be used individually. Do not attempt to run the entire code below as is. Extract the commands you need and insert them into your code in appropriate places, one at a time. The comments accompanying each RUN command explain the functions.
' To Display the Control Panelrun"rundll32.exe shell32.dll Control_RunDLL"' To Display Add/Remove Programsrun"rundll32.exe shell32.dll Control_RunDLL appwiz.cpl"'To Display System Propertiesrun"rundll32.exe shell32.dll Control_RunDLL sysdm.cpl"' To Display the Accessibility Propertiesrun"rundll32.exe shell32.dll Control_RunDLL access.cpl"'To Show the Display Settings Propertiesrun"rundll32.exe shell32.dll Control_RunDLL desk.cpl"'To Display Internet Explorer Control Panetrun"rundll32.exe shell32.dll Control_RunDLL inetcpl.cpl"'To Display Regional Settingsrun"rundll32.exe shell32.dll Control_RunDLL intl.cpl"'To Display the Mouse Settingsrun"rundll32.exe shell32.dll Control_RunDLL main.cpl @0"'To Display the Keyboard Settingsrun"rundll32.exe shell32.dll Control_RunDLL main.cpl @1"'To Display the Joystick Settingsrun"rundll32.exe shell32.dll Control_RunDLL joy.cpl"'To Display Multimedia Settingsrun"rundll32.exe shell32.dll Control_RunDLL mmsys.cpl"'To Display Modem Settingsrun"rundll32.exe shell32.dll Control_RunDLL modem.cpl"'To Display 'Add New Printer' Wizard run"rundll32.exe shell32.dll SHHelpShortcuts_RunDLL AddPrinter"'To Display Time/Date Settingsrun"rundll32.exe shell32.dll Control_RunDLL timedate.cpl"'To display the Copy Disk dialog for removable mediarun"rundll32.exe diskcopy.dll DiskCopyRunDll"'To Display the floppy disk Format Drive dialog.run"rundll32.exe shell32.dll SHFormatDrive"'To create a new Briefcase on the desktoprun"rundll32.exe syncui.dll,Briefcase_Create "'To Display Fonts Folderrun"rundll32.exe shell32.dll SHHelpShortcuts_RunDLL FontsFolder"'To Display the Printers Folderrun"rundll32.exe shell32.dll,SHHelpShortcuts_RunDLL PrintersFolder"'To Display the Application/File "Open With" dialog '--passing the full file drive, path and name as a parameter will '--cause the dialog to display the line '"Click the program you want to use to open the file '{filename}'". '--note that the filename given as the last argument MUST be the name'--of an existing file on diskrun"rundll32.exe shell32.dll,OpenAs_RunDLL c:\my documents\test.bas"'To Display Themes Applet, if installedrun"rundll32.exe shell32.dll,Control_RunDLL themes.cpl"'To Display Telephony Propertiesrun"rundll32.exe shell32.dll,Control_RunDLL telephon.cpl"'To Display Office FindFast, if installedrun"rundll32.exe shell32.dll Control_RunDLL findfast.cpl"
Running Control Panel Applets
-Running Control Panel Applets | Example Program | The Command List
Windows computers come with several management functions in the form of small programs . We can invoke these applets with our Liberty BASIC code. We can cause things like the control panel, desktop settings, and accessibility options applets to run.
The control panel looks like this:
The desktop properties dialog looks like this:
The following commands show how to use rundll32.exe to invoke these applets. Control panel applets have the extension *.cpl. Most of the examples come from the shell32.dll, but there are a few other goodies in the list.
These commands simply call up dialogs. They do not cause any changes to be made to the user's computer. The user can make changes in the dialogs, or cancel them.
Example Program
The example runs the display settings dialog. The applet is "desk.cpl".
The Command List
The following RUN commands are meant to be used individually. Do not attempt to run the entire code below as is. Extract the commands you need and insert them into your code in appropriate places, one at a time. The comments accompanying each RUN command explain the functions.Running Control Panel Applets | Example Program | The Command List