控制面板的调用
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 |
void __fastcall TForm1::Button1Click(TObject *Sender) { UINT Res; // WinExe的返回结果 // 显示控制面板 Res = WinExec("rundll32.exe shell32.dll,Control_RunDLL",9); if( Res==0 ) MessageBox(Handle, "程序超出内存。", "错误", MB_OK|MB_ICONERROR); else if( Res==ERROR_BAD_FORMAT ) MessageBox(Handle,"命令错误。", "错误", MB_OK|MB_ICONERROR); else if( Res==ERROR_FILE_NOT_FOUND ) MessageBox(Handle,"指定文件没找到。", "错误", MB_OK|MB_ICONERROR); else if( Res==ERROR_PATH_NOT_FOUND ) MessageBox(Handle,"指定路径没找到。", "错误", MB_OK|MB_ICONERROR); } //--------------------------------------------------------------------------- void __fastcall TForm1::Button2Click(TObject *Sender) { // 辅助选项 | 键盘 WinExec("rundll32.exe shell32.dll,Control_RunDLL access.cpl,,1", 9); } //--------------------------------------------------------------------------- void __fastcall TForm1::Button3Click(TObject *Sender) { // 添加/删除程序 属性 | 安装/卸载 WinExec("rundll32.exe shell32.dll,Control_RunDLL Appwiz.cpl,,1", 9); } //--------------------------------------------------------------------------- void __fastcall TForm1::Button4Click(TObject *Sender) { // 显示 属性 | 背景 WinExec("rundll32.exe shell32.dll,Control_RunDLL desk.cpl,,0",9); } //--------------------------------------------------------------------------- void __fastcall TForm1::Button5Click(TObject *Sender) { // Internet 属性 | 常规 WinExec("rundll32.exe shell32.dll,Control_RunDLL Inetcpl.cpl,,0",9); } //--------------------------------------------------------------------------- void __fastcall TForm1::Button6Click(TObject *Sender) { // 区域设置 属性 | 区域设置 WinExec("rundll32.exe shell32.dll,Control_RunDLL Intl.cpl,,0",9); } //--------------------------------------------------------------------------- void __fastcall TForm1::Button7Click(TObject *Sender) { // 游戏控制器 | 一般 WinExec("rundll32.exe shell32.dll,Control_RunDLL Joy.cpl,,0",9); } //--------------------------------------------------------------------------- void __fastcall TForm1::Button8Click(TObject *Sender) { // 鼠标 属性 | 按钮 WinExec("rundll32.exe shell32.dll,Control_RunDLL Main.cpl",9); } //--------------------------------------------------------------------------- void __fastcall TForm1::Button9Click(TObject *Sender) { // 多媒体 属性 | 音频 WinExec("rundll32.exe shell32.dll,Control_RunDLL Mmsys.cpl,,0",9); } //--------------------------------------------------------------------------- void __fastcall TForm1::Button10Click(TObject *Sender) { // 调制解调器 属性 WinExec("rundll32.exe shell32.dll,Control_RunDLL Modem.cpl",9); } //--------------------------------------------------------------------------- void __fastcall TForm1::Button11Click(TObject *Sender) { // 网络 | 配置 WinExec("rundll32.exe shell32.dll,Control_RunDLL Netcpl.cpl",9); } //--------------------------------------------------------------------------- void __fastcall TForm1::Button12Click(TObject *Sender) { // 密码 属性 | 更改密码 WinExec("rundll32.exe shell32.dll,Control_RunDLL Password.cpl",9); } //--------------------------------------------------------------------------- void __fastcall TForm1::Button13Click(TObject *Sender) { // 扫描仪与数字相机 属性 | 设备 WinExec("rundll32.exe shell32.dll,Control_RunDLL Sticpl.cpl",9); } //--------------------------------------------------------------------------- void __fastcall TForm1::Button14Click(TObject *Sender) { // 系统 属性 | 常规 WinExec("rundll32.exe shell32.dll,Control_RunDLL Sysdm.cpl,,0",9); } //--------------------------------------------------------------------------- void __fastcall TForm1::Button15Click(TObject *Sender) { // 日期/时间 属性 | 日期和时间 WinExec("rundll32.exe shell32.dll,Control_RunDLL timedate.cpl",9); } //--------------------------------------------------------------------------- void __fastcall TForm1::Button16Click(TObject *Sender) { // 电源管理 属性 | 电源方案 WinExec("rundll32.exe shell32.dll,Control_RunDLL Powercfg.cpl",9); } //--------------------------------------------------------------------------- void __fastcall TForm1::Button17Click(TObject *Sender) { // 拨号 属性 | 我的位置 WinExec("rundll32.exe shell32.dll,Control_RunDLL Telephon.cpl",9); } |