Shell "control powercfg.cpl", vbNormalFocus
hCORe писал(а):
- Код: Выделить всё
Shell "control powercfg.cpl", vbNormalFocus
MSDN писал(а):PSS ID Number: 166168
Article Last Modified on 7/15/2004
--------------------------------------------------------------------------------
The information in this article applies to:
Microsoft Visual C++ 2.0
Microsoft Visual C++ 2.1
Microsoft Visual C++ 2.2
Microsoft Visual C++ 4.0
Microsoft Visual C++ 4.1
Microsoft Visual C++, 32-bit Enterprise Edition 4.2
Microsoft Visual C++, 32-bit Enterprise Edition 5.0
Microsoft Visual C++, 32-bit Professional Edition 4.2
Microsoft Visual C++, 32-bit Professional Edition 5.0
--------------------------------------------------------------------------------
This article was previously published under Q166168
SUMMARY
You can use the RUNDLL32 application that is provided with Windows NT and Windows 95 to debug Control Panel applets. Use the following debug settings (set by selecting Build/Settings in Visual C++ version 4.x, or by selecting Project/Settings in Visual C++ version 2.x and 5.0):
Executable For Debug Session: C:\winnt\system32\rundll32.exe
- or -
C:\windows\rundll32.exe
Working Directory:
Program Arguments: shell32.dll,Control_RunDLL [path and name of
CPL file]
Remote Executable Path and File Name:
The two choices for "Executable For Debug Session" are for both Windows NT and Windows 95. You must type in the name "Control_RunDLL" exactly, and you must use the full path and name of the Control Panel applet (.CPL file). You do not have to provide information for "Working Directory" and "Remote Executable Path and File Name."
MORE INFORMATION
The technique described here is subject to change in future versions of Windows and is provided for debugging purposes only. If you want your application to launch control panel applications programmatically, you should use the Control.exe program.
REFERENCES
For additional information, please see the following article in the Microsoft Knowledge Base:
135068 How to Start a Control Panel Applet in Windows 95
Keywords: kbBug kbDebug kbhowto kbide KB166168
Technology: kbAudDeveloper kbVC200 kbVC210 kbVC220 kbVC32bitSearch kbVC400 kbVC410 kbVC420 kbVC500 kbVC500Search kbVCsearch
http://support.microsoft.com/kb/135068/ писал(а):Control.exe is a utility that is included with Windows 95, Windows 98, Windows NT 4.0, and Windows 2000 that launches Control Panel applications. Applications can use the following command line to start a Control Panel applet:
control.exe mycontrol.cpl
This starts the first control panel applet in Mycontrol.cpl. If you have multiple Control Panel applets in Mycontrol.cpl, you need to add to the following line exactly as shown:
Control.exe mycontrol.cpl,@1
@1 specifies the second (zero-based) applet in the .cpl file. If you don't specify this parameter, @0 is used by default.
The final (optional) parameter serves as the command line parameters passed to the Control Panel applet in the CPL_STARTWPARM notification. For example, some of the system's Control Panel applets take the page number (one based, not zero based) as the command line parameter. For example, if you want to start the Add/Remove Programs applet from the Windows Setup page so you can instruct the user to add extra system components, you can use this code:
Control.exe appwiz.cpl,@0,2
Сейчас этот форум просматривают: AhrefsBot, Yandex-бот и гости: 25