代码如下:
Private Sub Command1_Click() '去掉警告信息
Dim hkey As Long
RegCreateKey HKEY_LOCAL_MACHINE, "Software\Microsoft\Windows NT\CurrentVersion\Winlogon", hkey
RegDeleteValue hkey, "legalnoticecaption"
RegDeleteValue hkey, "LegalNoticeText"
MsgBox "已完成设置,请重新启动计算机!", , "提示信息"
End Sub
Private Sub Command2_Click() '添加警告信息
Dim hkey As Long
RegOpenKeyEx HKEY_LOCAL_MACHINE, "Software\Microsoft\Windows NT\CurrentVersion", 0, 0, hkey
RegCreateKey HKEY_LOCAL_MACHINE, "Software\Microsoft\Windows NT\CurrentVersion\Winlogon", hkey
Dim a As Byte
a = &O1
RegSetValueEx hkey, "legalnoticecaption", 0, REG_SZ, ByVal Text1.Text, 255
RegSetValueEx hkey, "LegalNoticeText", 0, REG_SZ, ByVal Text2.Text, 255
MsgBox "已完成设置,请重新启动计算机!", , "提示信息"
End Sub
RegCreateKey为何显示子程序或函数未定义??又如何定义?
慕尼黑的夜晚无繁华
慕妹3242003
MMTTMM