Call system component from VB/VBA
Sometimes can be necessary to examine or change system adjustment Windows. And want this do immediately from program, rather then through Starting --> Panel of control --> Necessary adjustment
Their own components offers For majority of the system installation Windows. Exists several groups of ten of the windows, offerring anything change in system. Each of such window possible to cause from VB, without using nor one API-functions. The Sets of such windows are found in library Windows'a with extension ".cpl". For instance in library desk.cpl are found four standard windows (more exactly one window with ÷åòûðìÿ bookmark): "Background", "Logo", "Adjustment", "Registration" (In Windows XP was added fifth bookmark Subject ). To cause not simply necessary window, but else and necessary bookmark, in parameter of the call it is necessary to install the index of the necessary bookmark. Call occurs with the help of usual function Shell, but little unusual ways:
Call Shell("rundll32.exe shell32.dll,Control_RunDLL desk.cpl, ,0" )
Will Open the window a characteristic screen with bookmark "Background". But now some libraries and parameters. Only, it is necessary to take into account that composition of the libraries and parameter can depend on versions Winduws. Where possible, I shall indicate the differences.
Screen - desk.cpl
- Background/Worker table = "desk.cpl, ,0"
- logo = "desk.cpl, ,1"
- registration = "desk.cpl, ,2"
- adjustment/parameters = "desk.cpl, ,3"
- subjects = "desk.cpl, ,5" (Windows XP)
Special possibilities – access.cpl
- keyboard = "access.cpl, ,1"
- sounds = "access.cpl, ,2"
- screen = "access.cpl, ,3"
- mouse = "access.cpl, ,4"
- general = "access.cpl, ,5"
Main - main.cpl, it is used for mouse governing, keyboard, printer, font.
- mouse = "main.cpl @0"
- buttons mouse = "main.cpl @0,0" (Windows 2000/XP)
- pointers mouse = "main.cpl @0,1" (Windows XP)
- parameters of the pointer mouse = "main.cpl @0,2" (Windows XP)
- êîëåñèêî ìûøè = "main.cpl @0,3" (Windows XP)
- equipment = "main.cpl @0,4" (Windows XP)
In Windows 2000 not smog to switch the âêëàäêè. Instead of @0 possible substitute following importances and get, accordingly:
- a keyboard = main.cpl @1
and for XP
- velocity =”main.cpl @1,0” (Windows 98/2000)
- language =”main.cpl @1,1” (Windows 9x/2000)
- equipment =”main.cpl @1,1” (Windows XP)
- equipment =”main.cpl @1,2” (Windows 2000)
- printer =”main.cpl @2” (Windows 9x)
- font =”main.cpl @3” (Windows 9x)
Language and regional parameters – intl.cpl
- regional standards/regional parameters = “intl.cpl,,0” (Windows 9õ/ÕÐ)
- general = “intl.cpl, ,0” (Windows 2000)
- numbers = “intl.cpl, ,1” (Windows 9õ/2000) (â Windows XP íà âêëàäêå «ðåãèîíàëüíûå ïàðàìåòðû»)
- languages = “intl.cpl, ,1” (Windows XP)
- money unit = intl.cpl, ,2 (Windows 9õ/2000) (in Windows XP on âêëàäêå regional parameters )
- in addition = “intl.cpl, ,2” (Windows XP)
- time = intl.cpl, ,3 (Windows 9õ/2000) (in Windows XP on âêëàäêå regional parameters )
- date = intl.cpl, ,4 (Windows 9õ/2000) (in Windows XP on âêëàäêå regional parameters )
- languages and spreading = “intl.cpl, ,5” (Windows 2000)
Date and time - timedate.cpl
- Date and time = "timedate.cpl, ,0"
- time zone = "timedate.cpl, ,1"
Modem - modem.cpl
- modems = "modem.cpl" (Windows 9õ two âêëàäêè, switch not to manage) (âêëàäêà modems on form Telephone and modem in Windows 9õ/2000/XP)
Telephone and modem - telephon.cpl
- set of the number = "telephon.cpl, , 0"(Windows 2000/XP)
- modems = "telephon.cpl, ,1"(Windows 2000/XP)
- in addition = "telephon.cpl, ,2"(Windows 2000/XP)
 Windows 9õ äve âêëàäêè. Switch not to manage
Network/deskside - netcpl.cpl (Windows 9õ)
Three âêëàäêè. Switch not to manage.
Master of the adjustment to network –netsetup.cpl (Windows XP)
Fax – fax.cpl (Windows 2000/XP)
- information about user = "telephon.cpl, ,0"
- title pages = "telephon.cpl, ,1"
- monitor of the condition = "telephon.cpl, ,2"
- additional parameters = "telephon.cpl, ,3"
Autor: Joss
It Is Added: 19.01.2008