Document directory
- Contrast
- Password
- Owner information. Identification
- Owner information. Notes
- Power
- Memory. Main
- Memory. running programs
- About. Version
- About. device ID
- About. Copyrights
- Backlight. battery power
- Backlight. External Power
- Input. Input Method
- Input. Word completion
- Input. Options
- Sounds & reminders. valume
- Sounds & reminders. Sounds
- Sounds & reminders. Reminders
- Remove Programs
- Menus. Start Menu
- Menus. New menu
- Buttons. Program buttons
- Buttons. up/down control
- Today
- Clock. Time
- Clock. Alarms
- Regional Settings. Region
- Regional Settings. Number
- Regional Settings. Currency
- Regional Settings. Time
- Regional Settings. Date
Using Control Panel
By Vassili Phillips, October 29,200 1.
Print Version
Introduction
Sometimes we need to show a Control Panel applet (Control Panel page) from our program. that is necessary when users of your program often change some system settings and you want to provide an easy interface for that. this article shows how to open certain Control Panel applet from your program.
You shoshould be careful because some Pocket PC devices don't support some control panel applets. You can find information about applets support in creating shortcuts to feature settings article by Steven Perry.
To open a control panel page
You have to run ctlpnl.exe program with "cplmain. CPL,X,Y"Argument whereXIs ID of the Control Panel applet andYIs an index of a tab page (most applets have several tabs). Here is a sample code that openes a control page with information about alarms.
Cstring strparam; <br/> strparam. format (_ T ("cplmain. CPL, % d, % d "), 16, 1); <br/> process_information PI; <br/> If (! : CreateProcess (_ T ("\ Windows \ ctlpnl.exe"), <br/> strparam, null, null, false, 0, null, & amp; pi) <br/>{< br/> // cannot start Control Panel Process <br/>}< br/>
Stcontrolpanel
You can also use stcontrolpanel library that encapsulates working with the control panel. You shoshould createCstcontrolpanelObject using Control Panel applet ID and Tab page index (the second parameter is optional ).
Here is a sample code that openes a control page with information about alarms.
Cstcontrolpanel CP (st_cpapplet_clock, st_cpapplet_clock_alarms); <br/> CP. open (); <br/>
Control Panel applets
This section enumerates only some control panel applets. Some devices contain more applets then the others, and not all enumerated applets are supported by all devices.
|
Contrast
| Applet ID: |
0 |
| Applet ID: |
St_cpapplet_contrast |
|
|
Password
| Applet ID: |
1 |
| Applet ID: |
St_cpapplet_password |
|
|
Owner information. Identification
| Applet ID: |
2 |
| Tab index: |
0 |
| Applet ID: |
St_cpapplet_ownerinfo |
| Tab index: |
St_cpapplet_ownerinfo_identification |
|
|
Owner information. Notes
| Applet ID: |
2 |
| Tab index: |
1 |
| Applet ID: |
St_cpapplet_ownerinfo |
| Tab index: |
St_cpapplet_ownerinfo_notes |
|
|
Power
| Applet ID: |
3 |
| Applet ID: |
St_cpapplet_power |
|
|
Memory. Main
| Applet ID: |
4 |
| Tab index: |
0 |
| Applet ID: |
St_cpapplet_memory |
| Tab index: |
St_cpapplet_memory_main |
|
|
Memory. running programs
| Applet ID: |
4 |
| Tab index: |
1 |
| Applet ID: |
St_cpapplet_memory |
| Tab index: |
St_cpapplet_memory_runningprograms |
|
|
About. Version
| Applet ID: |
5 |
| Tab index: |
0 |
| Applet ID: |
St_cpapplet_about |
| Tab index: |
St_cpapplet_about_version |
|
|
About. device ID
| Applet ID: |
5 |
| Tab index: |
1 |
| Applet ID: |
St_cpapplet_about |
| Tab index: |
St_cpapplet_about_deviceid |
|
|
About. Copyrights
| Applet ID: |
5 |
| Tab index: |
2 |
| Applet ID: |
St_cpapplet_about |
| Tab index: |
St_cpapplet_about_copyrights |
|
|
Backlight. battery power
| Applet ID: |
6 |
| Tab index: |
0 |
| Applet ID: |
St_cpapplet_backlight |
| Tab index: |
St_cpapplet_backlight_battery |
|
|
Backlight. External Power
| Applet ID: |
6 |
| Tab index: |
1 |
| Applet ID: |
St_cpapplet_backlight |
| Tab index: |
St_cpapplet_backlight_external |
|
|
Input. Input Method
| Applet ID: |
8 |
| Tab index: |
0 |
| Applet ID: |
St_cpapplet_input |
| Tab index: |
St_cpapplet_input_inputmehtodd |
|
|
Input. Word completion
| Applet ID: |
8 |
| Tab index: |
1 |
| Applet ID: |
St_cpapplet_input |
| Tab index: |
St_cpapplet_input_wordcompletion |
|
|
Input. Options
| Applet ID: |
8 |
| Tab index: |
2 |
| Applet ID: |
St_cpapplet_input |
| Tab index: |
St_cpapplet_input_options |
|
|
Sounds & reminders. valume
| Applet ID: |
9 |
| Tab index: |
0 |
| Applet ID: |
St_cpapplet_sndandreminders |
| Tab index: |
St_cpapplet_sndandreminders_volume |
|
|
Sounds & reminders. Sounds
| Applet ID: |
9 |
| Tab index: |
1 |
| Applet ID: |
St_cpapplet_sndandreminders |
| Tab index: |
St_cpapplet_sndandreminders_sounds |
|
|
Sounds & reminders. Reminders
| Applet ID: |
9 |
| Tab index: |
2 |
| Applet ID: |
St_cpapplet_sndandreminders |
| Tab index: |
St_cpapplet_sndandreminders_reminders |
|
|
Remove Programs
| Applet ID: |
10 |
| Applet ID: |
St_cpapplet_removeprogs |
|
|
Menus. Start Menu
| Applet ID: |
11 |
| Tab index: |
0 |
| Applet ID: |
St_cpapplet_menus |
| Tab index: |
St_cpapplet_menus_startmenu |
|
|
Menus. New menu
| Applet ID: |
11 |
| Tab index: |
1 |
| Applet ID: |
St_cpapplet_menus |
| Tab index: |
St_cpapplet_menus_newmenu |
|
|
Buttons. Program buttons
| Applet ID: |
12 |
| Tab index: |
0 |
| Applet ID: |
St_cpapplet_buttons |
| Tab index: |
St_cpapplet_buttons_programbuttons |
|
|
Buttons. up/down control
| Applet ID: |
12 |
| Tab index: |
1 |
| Applet ID: |
St_cpapplet_buttons |
| Tab index: |
St_cpapplet_buttons_updowncontrol |
|
|
Today
| Applet ID: |
13 |
| Applet ID: |
St_cpapplet_today |
|
|
Clock. Time
| Applet ID: |
16 |
| Tab index: |
0 |
| Applet ID: |
St_cpapplet_clock |
| Tab index: |
St_cpapplet_clock_time |
|
|
Clock. Alarms
| Applet ID: |
16 |
| Tab index: |
1 |
| Applet ID: |
St_cpapplet_clock |
| Tab index: |
St_cpapplet_clock_alarms |
|
|
Regional Settings. Region
| Applet ID: |
18 |
| Tab index: |
0 |
| Applet ID: |
St_cpapplet_rs |
| Tab index: |
St_cpapplet_rs_region |
|
|
Regional Settings. Number
| Applet ID: |
18 |
| Tab index: |
1 |
| Applet ID: |
St_cpapplet_rs |
| Tab index: |
St_cpapplet_rs_number |
|
|
Regional Settings. Currency
| Applet ID: |
18 |
| Tab index: |
2 |
| Applet ID: |
St_cpapplet_rs |
| Tab index: |
St_cpapplet_rs_currency |
|
|
Regional Settings. Time
| Applet ID: |
18 |
| Tab index: |
3 |
| Applet ID: |
St_cpapplet_rs |
| Tab index: |
St_cpapplet_rs_time |
|
|
Regional Settings. Date
| Applet ID: |
18 |
| Tab index: |
4 |
| Applet ID: |
St_cpapplet_rs |
| Tab index: |
St_cpapplet_rs_date |
|
Related Resources:
- Section: Control Panel
- Article: Creating Control Panel applet
- QA: How can I get information about control panel applets like dialog names, icons, etc?
- Article: Creating shortcuts to feature settings
- Library: stcontrolpanel
Demo:
C # EVC
Transferred from:
Http://www.pocketpcdn.com/articles/controlpanel.html
Http://www.cnblogs.com/fox23/archive/2008/11/14/showing-Windows-mobile-control-panel-programmatically.html