📄 frmpassword.frm
字号:
VERSION 5.00
Begin VB.Form FrmPassword
BorderStyle = 3 'Fixed Dialog
Caption = "密码设置"
ClientHeight = 3360
ClientLeft = 45
ClientTop = 330
ClientWidth = 4890
Icon = "FrmPassword.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 3360
ScaleWidth = 4890
ShowInTaskbar = 0 'False
StartUpPosition = 3 '窗口缺省
Begin VB.TextBox Text1
Alignment = 1 'Right Justify
Height = 375
IMEMode = 3 'DISABLE
Index = 2
Left = 2280
PasswordChar = "*"
TabIndex = 7
Top = 1800
Width = 1815
End
Begin VB.TextBox Text1
Alignment = 1 'Right Justify
Height = 375
IMEMode = 3 'DISABLE
Index = 1
Left = 2280
PasswordChar = "*"
TabIndex = 6
Top = 1080
Width = 1815
End
Begin VB.TextBox Text1
Alignment = 1 'Right Justify
Height = 375
IMEMode = 3 'DISABLE
Index = 0
Left = 2280
PasswordChar = "*"
TabIndex = 5
Top = 360
Width = 1815
End
Begin VB.CommandButton Command2
Caption = "取消"
Height = 495
Left = 2880
TabIndex = 4
Top = 2520
Width = 975
End
Begin VB.CommandButton Command1
Caption = "确认"
Height = 495
Left = 1080
TabIndex = 3
Top = 2520
Width = 975
End
Begin VB.Label Label3
Alignment = 1 'Right Justify
AutoSize = -1 'True
Caption = "确认密码:"
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 285
Left = 600
TabIndex = 2
Top = 1920
Width = 1290
End
Begin VB.Label Label2
Alignment = 1 'Right Justify
AutoSize = -1 'True
Caption = "新密码:"
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 285
Left = 945
TabIndex = 1
Top = 1200
Width = 1005
End
Begin VB.Label Label1
Alignment = 1 'Right Justify
AutoSize = -1 'True
Caption = "原密码"
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 285
Left = 960
TabIndex = 0
Top = 480
Width = 855
End
End
Attribute VB_Name = "FrmPassword"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim Setup_DB As Database
Dim Setup_RS As Recordset
Private Sub Command1_Click()
Set Setup_DB = OpenDatabase(App.Path + "\setup.mdb")
Set Setup_RS = Setup_DB.OpenRecordset("参数设定")
If Text1(0).Text = Setup_RS.Fields(13) Or Setup_RS.Fields(13) = "-" Then
If Text1(1).Text = Text1(2).Text Then
Setup_RS.Edit
If Text1(1).Text = "" Then
Setup_RS.Fields(13) = "-"
Else
Setup_RS.Fields(13) = Text1(1).Text
End If
Setup_RS.Update
MsgBox "密码改功!", 64, "提示"
Unload Me
FrmMain.Show
Else
MsgBox "两次输入密码不一样", 16, "出错提示"
End If
Else
MsgBox "原密码不正确", 16, "出错提示"
End If
For x = 0 To 2
Text1(x).Text = ""
Next x
End Sub
Private Sub Command2_Click()
Unload Me
FrmMain.Show
End Sub
Private Sub Form_Load()
Set Setup_DB = OpenDatabase(App.Path + "\setup.mdb")
Set Setup_RS = Setup_DB.OpenRecordset("参数设定")
If Setup_RS.Fields(13) = "-" Then Text1(0).Enabled = False
Setup_DB.Close
End Sub
Private Sub Form_Unload(Cancel As Integer)
Unload Me
FrmMain.Show
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -