📄 form1.frm
字号:
VERSION 5.00
Begin VB.Form form1
BackColor = &H00FFC0C0&
Caption = "去掉开始菜单中的关闭系统项"
ClientHeight = 1500
ClientLeft = 60
ClientTop = 345
ClientWidth = 4125
LinkTopic = "Form1"
ScaleHeight = 1500
ScaleWidth = 4125
StartUpPosition = 1 '所有者中心
Begin VB.CommandButton Command3
BackColor = &H00FF8080&
Caption = "退出"
Height = 405
Left = 510
Style = 1 'Graphical
TabIndex = 2
Top = 660
Width = 3045
End
Begin VB.CommandButton Command2
BackColor = &H00FF8080&
Caption = "显示关闭系统项"
Height = 405
Left = 2070
Style = 1 'Graphical
TabIndex = 1
Top = 180
Width = 1485
End
Begin VB.CommandButton Command1
BackColor = &H00FF8080&
Caption = "去掉关闭系统项"
Height = 405
Left = 510
Style = 1 'Graphical
TabIndex = 0
Top = 180
Width = 1485
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Height = 375
Left = 45
TabIndex = 3
Top = 1095
Width = 4065
End
End
Attribute VB_Name = "form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Const REG_DWORD As Long = 4
Const REG_DWORD_BIG_ENDIAN As Long = 5
Const HKEY_USERS = &H80000003
Private Declare Function RegCloseKey Lib "advapi32.dll" (ByVal hKey As Long) As Long
Private Declare Function RegCreateKey Lib "advapi32.dll" Alias "RegCreateKeyA" _
(ByVal hKey As Long, ByVal lpSubKey As String, phkResult As Long) As Long
Private Declare Function RegSetValueEx Lib "advapi32.dll" Alias "RegSetValueExA" _
(ByVal hKey As Long, ByVal lpValueName As String, ByVal Reserved As Long, _
ByVal dwType As Long, lpData As Any, ByVal cbData As Long) As Long
Private Sub Command1_Click()
Dim hKey As Long
RegCreateKey HKEY_USERS, _
".DEFAULT\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer", hKey
Dim L As Long
L = 1
RegSetValueEx hKey, "noclose", 1, REG_DWORD, L, 4
MsgBox "已去掉关闭系统项! 请重新启动计算机!"
RegCloseKey hKey
End Sub
Private Sub Command2_Click()
Dim hKey As Long
RegCreateKey HKEY_USERS, _
".DEFAULT\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer", hKey
Dim L As Long
L = 0
RegSetValueEx hKey, "noclose", 0, REG_DWORD, L, 4
MsgBox "已恢复关闭系统项! 请重新启动计算机!"
RegCloseKey hKey
End Sub
Private Sub Command3_Click()
End
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -