📄 frmset.frm
字号:
VERSION 5.00
Begin VB.Form Frmset
Caption = "系统设置的口令校验"
ClientHeight = 3990
ClientLeft = 60
ClientTop = 345
ClientWidth = 5370
Icon = "Frmset.frx":0000
LinkTopic = "Form4"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 3990
ScaleWidth = 5370
StartUpPosition = 3 '窗口缺省
Begin VB.CheckBox Chk_Autorun
Caption = "开机后自动运行"
Height = 255
Left = 240
TabIndex = 12
Top = 3360
Width = 1935
End
Begin VB.CommandButton Cmdexit
Caption = "取消"
Height = 375
Left = 3840
TabIndex = 11
Top = 3360
Width = 975
End
Begin VB.CommandButton cmdok
Caption = "确定"
Height = 375
Left = 2640
TabIndex = 10
Top = 3360
Width = 975
End
Begin VB.Frame Frame2
Caption = "备份模式"
Height = 855
Left = 240
TabIndex = 7
Top = 2280
Width = 4815
Begin VB.OptionButton Optauto
Caption = "自动备份"
Height = 375
Left = 2760
TabIndex = 9
Top = 240
Value = -1 'True
Width = 1335
End
Begin VB.OptionButton Opthand
Caption = "手工备份"
Height = 255
Left = 480
TabIndex = 8
Top = 360
Width = 1095
End
End
Begin VB.TextBox Txtoldpass
Height = 372
IMEMode = 3 'DISABLE
Left = 1200
PasswordChar = "*"
TabIndex = 1
Text = "Text1"
Top = 1200
Width = 1212
End
Begin VB.TextBox Txtnewpass
Height = 372
IMEMode = 3 'DISABLE
Left = 3480
PasswordChar = "*"
TabIndex = 0
Text = "Text2"
Top = 1200
Width = 1212
End
Begin VB.Frame Frame1
Caption = "口令校验"
Height = 1335
Left = 240
TabIndex = 4
Top = 360
Width = 4815
Begin VB.Label Label1
Caption = "原口令"
Height = 255
Left = 240
TabIndex = 6
Top = 720
Width = 615
End
Begin VB.Label Label2
Caption = "新口令"
Height = 255
Left = 2520
TabIndex = 5
Top = 720
Width = 615
End
End
Begin VB.CommandButton Cmdpassmodify
Caption = "口令修改"
Height = 372
Left = 3720
TabIndex = 3
Top = 1800
Width = 1092
End
Begin VB.CommandButton Cmdpasssure
Caption = "口令确认"
Height = 372
Left = 2400
TabIndex = 2
Top = 1800
Width = 1092
End
End
Attribute VB_Name = "Frmset"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Chk_Autorun_Click()
Dim strString As String
If Chk_Autorun.Value = 1 Then
'建立一个指定的关键字
strString = App.Path + "\AutoDataBak.exe"
If strString = "" Then Exit Sub
Call savestring(HKEY_LOCAL_MACHINE, "SOFTWARE\Microsoft\Windows\CurrentVersion\Run", "AutoDataBak", strString)
Else
Call DeleteValue(HKEY_LOCAL_MACHINE, "SOFTWARE\Microsoft\Windows\CurrentVersion\Run", "AutoDataBak")
End If
End Sub
Private Sub Cmdexit_Click()
Unload Me
End Sub
Private Sub Command1_Click()
End Sub
Private Sub Cmdok_Click()
SaveSetting "databackup", "sysinformation", "opthand", Opthand.Value
SaveSetting "databackup", "sysinformation", "optauto", Optauto.Value
SaveSetting "databackup", "sysinformation", "Chk_Autorun", Chk_Autorun.Value
Frmchoice.Show
Unload Me
End Sub
Private Sub Cmdpassmodify_Click()
Dim newpassTemp As String
newpassTemp = Trim(Txtnewpass.Text)
If newpassTemp = "" Then
SaveSetting "databackup", "sysinformation", "password", newpassTemp
Else
newpassTemp = EncryptText(Trim(Txtnewpass.Text), "ljp") '加密
SaveSetting "databackup", "sysinformation", "password", newpassTemp
End If
MsgBox "口令修改成功!", 64 + 0, Me.Caption
End Sub
Private Sub Cmdpasssure_Click()
Dim oldpassTemp As String
oldpassTemp = Trim(Txtoldpass.Text)
If Trim(Txtoldpass.Text) <> "" Then
oldpassTemp = EncryptText(oldpassTemp, "ljp") '解密
End If
If oldpassTemp = GetSetting("databackup", "sysinformation", "password") Then
Label1.Enabled = True
Txtnewpass.Enabled = True
Cmdpassmodify.Enabled = True
Label2.Enabled = True
'Opthand.Value = GetSetting("databackup", "sysinformation", "opthand")
'Optauto.Value = GetSetting("databackup", "sysinformation", "optauto")
Opthand.Enabled = True
Optauto.Enabled = True
Frame2.Enabled = True
Frame1.Enabled = True
Cmdok.Enabled = True
Else
tryTimes = tryTimes + 1
If tryTimes = 3 Then
MsgBox "口令校验失败!", 64 + 0, Me.Caption
If FirstEntry = False Then
Unload Me
Else
End
End If
Else
MsgBox "口令无效!请重新输入。", 64 + 0, Me.Caption
Txtoldpass.SetFocus
Txtoldpass.Text = ""
End If
End If
End Sub
Private Sub Form_Activate()
Dim Strtemp As String
CenterForm Me
On Error GoTo errhandler
Chk_Autorun.Value = GetSetting("databackup", "sysinformation", "Chk_Autorun")
Opthand.Value = GetSetting("databackup", "sysinformation", "opthand")
Optauto.Value = GetSetting("databackup", "sysinformation", "optauto")
Label1.Enabled = False
Txtnewpass.Enabled = False
Cmdpassmodify.Enabled = False
Frame1.Enabled = False
Frame2.Enabled = False
Label2.Enabled = False
Opthand.Enabled = False
Optauto.Enabled = False
Cmdok.Enabled = False
Txtoldpass.Text = ""
Txtnewpass.Text = ""
Txtoldpass.SetFocus
Exit Sub
errhandler:
Opthand.Value = False
Optauto.Value = True
Chk_Autorun.Value = 1
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -