📄 form.frm
字号:
VERSION 5.00
Begin VB.Form Form1
BorderStyle = 1 'Fixed Single
Caption = "调用系统中的功能对话框"
ClientHeight = 4350
ClientLeft = 45
ClientTop = 330
ClientWidth = 5010
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 4350
ScaleWidth = 5010
StartUpPosition = 3 '窗口缺省
Begin VB.CommandButton Command3
Caption = "退出程序"
Height = 492
Left = 1680
TabIndex = 21
Top = 3720
Width = 1092
End
Begin VB.Frame Frame6
Caption = "控制面板"
Height = 1212
Left = 1720
TabIndex = 15
Top = 0
Width = 1575
Begin VB.CommandButton Command23
Caption = "控制面板"
Height = 375
Left = 120
TabIndex = 17
Top = 240
Width = 1335
End
Begin VB.CommandButton Command24
Caption = "显示属性设置"
Height = 375
Left = 120
TabIndex = 16
Top = 720
Width = 1335
End
End
Begin VB.Frame Frame4
Caption = "鼠标/键盘"
Height = 1692
Left = 1720
TabIndex = 11
Top = 1440
Width = 1575
Begin VB.CommandButton Command11
Caption = "交换鼠标按钮功能"
Height = 375
Left = 120
TabIndex = 14
Top = 240
Width = 1335
End
Begin VB.CommandButton Command14
Caption = "禁止鼠标"
Height = 375
Left = 120
TabIndex = 13
Top = 720
Width = 1335
End
Begin VB.CommandButton Command13
Caption = "禁止键盘"
Height = 375
Left = 120
TabIndex = 12
Top = 1200
Width = 1335
End
End
Begin VB.Frame Frame3
Caption = "其它函数"
Height = 2772
Left = 3390
TabIndex = 8
Top = 0
Width = 1575
Begin VB.CommandButton Command21
Caption = "打开方式"
Height = 375
Left = 120
TabIndex = 20
Top = 2160
Width = 1335
End
Begin VB.CommandButton Command22
Caption = "格式化驱动器"
Height = 375
Left = 120
TabIndex = 19
Top = 1680
Width = 1335
End
Begin VB.CommandButton Command19
Caption = "软盘拷贝"
Height = 375
Left = 120
TabIndex = 18
Top = 1200
Width = 1335
End
Begin VB.CommandButton Command10
Caption = "增加新硬件"
Height = 375
Left = 120
TabIndex = 10
Top = 720
Width = 1335
End
Begin VB.CommandButton Command9
Caption = "打印测试页"
Height = 375
Left = 120
TabIndex = 9
Top = 240
Width = 1335
End
End
Begin VB.Frame Frame2
Caption = "退出Windows"
Height = 2172
Left = 60
TabIndex = 3
Top = 1440
Width = 1575
Begin VB.CommandButton Command8
Caption = "强制关机"
Height = 375
Left = 120
TabIndex = 7
Top = 1680
Width = 1335
End
Begin VB.CommandButton Command6
Caption = "重新启动"
Height = 375
Left = 120
TabIndex = 6
Top = 720
Width = 1335
End
Begin VB.CommandButton Command5
Caption = "关闭计算机"
Height = 375
Left = 120
TabIndex = 5
Top = 240
Width = 1335
End
Begin VB.CommandButton Command4
Caption = "注销用户"
Height = 375
Left = 120
TabIndex = 4
Top = 1200
Width = 1335
End
End
Begin VB.Frame Frame1
Caption = "排列窗体"
Height = 1215
Left = 60
TabIndex = 0
Top = 0
Width = 1575
Begin VB.CommandButton Command2
Caption = "层叠方式"
Height = 375
Left = 120
TabIndex = 2
Top = 720
Width = 1355
End
Begin VB.CommandButton Command1
Caption = "按标题"
Height = 375
Left = 120
TabIndex = 1
Top = 240
Width = 1355
End
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Shell "rundll32 user,tilechildwindows"
End Sub
Private Sub Command10_Click()
Shell "rundll32 sysdm.cpl,InstallDevice_Rundll"
End Sub
Private Sub Command11_Click()
'Swapped buttons is not possible return to default state
'with this function
Shell "rundll32 user,swapmousebutton"
End Sub
Private Sub Command13_Click()
'This will disable keyboard
'Usage this command with "enable" parameter is not functional!
If MsgBox("Disabled keyboard will be functional only after rebooting! Do You want to continue?", vbCritical + vbYesNo, "Caution!") = vbNo Then Exit Sub
Shell "rundll32 keyboard,disable"
End Sub
Private Sub Command14_Click()
'This will disable mouse
'Usage this command with "enable" parameter is not functional!
If MsgBox("Disabled mouse will be functional only after rebooting! Do You want to continue?", vbCritical + vbYesNo, "Caution!") = vbNo Then Exit Sub
Shell "rundll32 mouse,disable"
End Sub
Private Sub Command19_Click()
Shell "rundll32 diskcopy,DiskCopyRunDll", vbNormalFocus
End Sub
Private Sub Command2_Click()
Shell "rundll32 user,cascadechildwindows"
End Sub
Private Sub Command21_Click()
Shell "rundll32 shell32,OpenAs_RunDLL"
End Sub
Private Sub Command22_Click()
Shell "rundll32 shell32,SHFormatDrive"
End Sub
Private Sub Command23_Click()
Shell "rundll32 shell32,Control_RunDLL", vbNormalFocus
End Sub
Private Sub Command24_Click()
Shell "rundll32 shell32,Control_RunDLL desk.cpl"
End Sub
Private Sub Command3_Click()
Unload Me
End Sub
Private Sub Command4_Click()
Shell "rundll32 shell32,SHExitWindowsEx 0"
End Sub
Private Sub Command5_Click()
Shell "rundll32 shell32,SHExitWindowsEx 1"
End Sub
Private Sub Command6_Click()
Shell "rundll32 shell32,SHExitWindowsEx 2"
End Sub
Private Sub Command8_Click()
If MsgBox("All unsaved work will be lost! Do You want to continue?", vbCritical + vbYesNo, "Caution!") = vbNo Then Exit Sub
Shell "rundll32 krnl386.exe,exitkernel"
End Sub
Private Sub Command9_Click()
Shell "rundll32 msprint2.dll,RUNDLL_PrintTestPage"
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -