📄 frmsettings.frm
字号:
TabIndex = 4
Top = 3330
Width = 6315
Begin VB.CheckBox Check4
Caption = "从开始菜单删除""网络和拨号连接"""
Height = 210
Left = 135
TabIndex = 8
Top = 240
Width = 3225
End
Begin VB.CheckBox Check5
Caption = "禁用 internet连接向导"
Height = 270
Left = 135
TabIndex = 7
Top = 465
Width = 2805
End
Begin VB.CheckBox Check6
Caption = "禁止设置IE连接选项"
Height = 195
Left = 3555
TabIndex = 6
Top = 210
Width = 2130
End
Begin VB.CheckBox Check7
Caption = "隐藏[我的电脑]中拨号网络"
Height = 255
Left = 3555
TabIndex = 5
Top = 450
Width = 2640
End
End
End
Begin VB.CommandButton Command3
Caption = "设备属性"
Height = 300
Left = 1170
TabIndex = 2
Top = 4245
Width = 1065
End
Begin VB.CommandButton Command4
Caption = "默认设置"
Height = 300
Left = 2595
TabIndex = 1
Top = 4245
Width = 1035
End
Begin VB.CommandButton Command5
Caption = "保存设置"
Height = 300
Left = 3960
TabIndex = 0
Top = 4245
Width = 1110
End
End
Attribute VB_Name = "FrmSettings"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'****************************************************************************
'人人为我,我为人人
'枕善居汉出品
'发布日期:05/08/15
'描 述:拨号上网管理器
'网 站:http://www.mndsoft.com/
'e-mail:mnd@mndsoft.com
'OICQ : 88382850
'****************************************************************************
Option Explicit
Const ProgTitle = "上网管理器 v1.0"
Private Sub Check2_Click()
Text8 = "http://www.china-huahang.com/main.shtml"
If Check2.Value = 1 Then
Text8.Enabled = False
Else
Text8.Enabled = True
End If
End Sub
Private Sub Check5_Click()
Call SetKeyValue(hKey, SetKeyPropertyC, "IEWizards", Check5.Value, REG_DWORD)
End Sub
'禁止设置IE连接选项
Private Sub Check6_Click()
Call SetKeyValue(hKey, SetKeyPropertyC, "ConnectOption", Check6.Value, REG_DWORD)
End Sub
'在我的电脑中显示隐藏拨号网络
Private Sub Check7_Click()
If Check7.Value = 1 Then
Call DeleteKey(HKEY_LOCAL_MACHINE, "Software\Microsoft\Windows\CurrentVersion\explorer\MyComputer\NameSpace\{992CFFA0-F557-101A-88EC-00DD010CCC48}")
Else
Call CreateNewKey(HKEY_LOCAL_MACHINE, "Software\Microsoft\Windows\CurrentVersion\explorer\MyComputer\NameSpace\{992CFFA0-F557-101A-88EC-00DD010CCC48}") '其他
End If
End Sub
'增加
Private Sub Command1_Click()
'先检测数据有效性
If Len(Text3) = 0 Then
MsgBox "请输入需要拨号的用户大名!", vbCritical, ProgTitle
Text3.SetFocus
Exit Sub
End If
'密码
If Len(Text4) = 0 Then
MsgBox "您操作的拨号口令可要输入呦,别人用您的账号我可不管!", vbCritical, ProgTitle
Text4.SetFocus
Exit Sub
End If
If Len(Text5) = 0 Then
MsgBox "为防止万一,您还是再确认一次口令吧!", vbCritical, ProgTitle
Text5.SetFocus
Exit Sub
End If
If Text4 <> Text5 Then
MsgBox "哎,第一次咋和第二次密码不一样呢?", vbCritical, ProgTitle
Text5.SetFocus
Exit Sub
End If
Dim UserID
'If GetSetting(App.EXEName, "IsSetting", "Yesno", "") = "1" Then
If Val(QueryValue(hKey, "Software\Mndsoft", "IsSetting")) = 1 Then
UserID = QueryValue(hKey, CreateKeyA, "DialUserTotal")
Call SetKeyValue(hKey, SetKeyPropertyA, "UserName" & Trim(sTR(UserID + 1)), Trim(Text3), REG_SZ)
Call SetKeyValue(hKey, SetKeyPropertyA, "WatchWord" & Trim(sTR(UserID + 1)), Trim(Text4), REG_SZ)
Call SetKeyValue(hKey, SetKeyPropertyA, "Level" & Trim(sTR(UserID + 1)), IIf(Check1.Value = 1, "SuperManage", "GeneralManage"), REG_SZ)
Call SetKeyValue(hKey, CreateKeyA, "DialUserTotal", UserID + 1, REG_DWORD)
List2.AddItem Text3 & " " & IIf(Check1.Value = 1, "超级管理用户", "普通拨号用户")
' List1.AddItem Text3
Text3 = ""
Text4 = ""
Text5 = ""
Else
'初次建立系统基础信息
If Check1.Value <> 1 Then
MsgBox "第一次建立用户可是必须为超级权限呦!", vbInformation, ProgTitle
Check1.Value = 1
Exit Sub
End If
Call CreateNewKey(hKey, "Software\Mndsoft") '创建程序主键
Call SetKeyValue(hKey, "Software\Mndsoft\", "IsSetting", 1, REG_DWORD) '置标记为1
Call SetKeyValue(hKey, "Software\Mndsoft\", "ProgramName", "DialManager" & App.Major & "." & App.Minor, REG_SZ) '置程序名称
Call CreateNewKey(hKey, CreateKeyA) 'Property
Call CreateNewKey(hKey, SetKeyPropertyA) '用户列表
Call CreateNewKey(hKey, SetKeyPropertyB) '拨号设置
Call CreateNewKey(hKey, SetKeyPropertyC) '其他
'添加信息
Call SetKeyValue(hKey, SetKeyPropertyA, "UserName0", Trim(Text3), REG_SZ)
Call SetKeyValue(hKey, SetKeyPropertyA, "WatchWord0", Trim(Text4), REG_SZ)
Call SetKeyValue(hKey, SetKeyPropertyA, "Level0", "SuperManage", REG_SZ)
Call SetKeyValue(hKey, CreateKeyA, "DialUserTotal", 0, REG_DWORD)
List2.AddItem Text3 & " " & "超级管理用户"
frmDialupManage.List1.AddItem Text3
Text3 = ""
Text4 = ""
Text5 = ""
End If
End Sub
'保存以上设置
Private Sub Command5_Click()
'禁止IE显示“工具”中“INTERNET选项” ????无效
'在HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer下
'在右边的窗口中新建一个二进制值“NoFolderOptions”,并设值为“01 00 00 00”。'
'禁止使用注册表编辑文件regedit.Exe
' HKEY_USERS\.DEFAULT\Software\Microsoft\Windows\CurrentVersion\Policies\System
' 在右边的窗口中创建一个DOWRD值:"DisableRegistryTools",并将其值设为“1”。
' 禁止修改“控制面版”
' 在HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer下
' 在右边的窗口中新建一个二进制"NoSetFolders",并将其值设为"01 00 00 00"。
'禁止修改开始菜单
' 在HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer下
' 在右边的窗口中创建一个DOWRD值:"NoChangeStartMenu",并将其值设为“1”。
'禁用“网络”控制面板
' 在HKEY_USERS\.DEFAULT\Software\Microsoft\Windows\CurrentVersion\Network\System
' 下,在右边的窗口中新建DWORD值“NoNetSetup”,并设其值为“1”。
'禁止使用reg文件
' 在HKEY_LOCAL_MACHINE\Software\CLASSES\.reg下
' 在右边的窗口中更改“默认”值为“txtfile”
'禁止使用“重置WEB设置”
' 在HKEY_CURRENT_USER\Software\Policies\Microsoft\Internet Explorer\Control Panel下
' 在右边的窗口中新建一个DWORD值“Connection Settings”,并设值为“1”。
'禁止使用IE“internet选项”中的高级项(winnt适用)
' 在HKEY_CURRENT_USER\Software\Policies\Microsoft\Internet Explorer\Control Panel下
' 在右边的窗口中新建一个DWORD值“AdvancedTab”,并设值为“1”。
'禁止出现IE菜单中“工具”栏里“interner选项”
'
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -