📄 dialog.frm
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Begin VB.Form Dialog
BorderStyle = 3 'Fixed Dialog
Caption = "用户密码更改"
ClientHeight = 2280
ClientLeft = 3825
ClientTop = 2805
ClientWidth = 4590
Icon = "Dialog.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 2280
ScaleWidth = 4590
ShowInTaskbar = 0 'False
StartUpPosition = 2 '屏幕中心
Begin VB.Frame Frame1
Caption = "注意!"
Height = 1335
Left = 2280
TabIndex = 9
Top = 240
Width = 2055
Begin VB.Label Label4
Caption = " 密码必须是六位,并且区分大小写。密码丢失,将无法进入系统,请一定要牢记您的密码!"
Height = 975
Left = 120
TabIndex = 10
Top = 240
Width = 1815
End
End
Begin VB.TextBox Text4
Height = 270
IMEMode = 3 'DISABLE
Left = 1200
PasswordChar = "*"
TabIndex = 6
Top = 1320
Width = 855
End
Begin VB.TextBox Text2
Height = 270
IMEMode = 3 'DISABLE
Left = 1200
PasswordChar = "*"
TabIndex = 5
Top = 840
Width = 855
End
Begin VB.CommandButton Command2
Cancel = -1 'True
Caption = "取消"
Height = 320
Left = 3240
TabIndex = 4
Top = 1800
Width = 1095
End
Begin VB.CommandButton Command1
Caption = "确定"
Default = -1 'True
Height = 320
Left = 1800
TabIndex = 3
Top = 1800
Width = 1095
End
Begin VB.TextBox Text3
DataField = "普通用户密码"
DataSource = "Adodc1"
Height = 375
Left = 240
TabIndex = 2
Top = 3240
Width = 1455
End
Begin MSAdodcLib.Adodc Adodc1
Height = 330
Left = 1320
Top = 2760
Width = 1215
_ExtentX = 2143
_ExtentY = 582
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 3
LockType = 3
CommandType = 8
CursorOptions = 0
CacheSize = 50
MaxRecords = 0
BOFAction = 0
EOFAction = 0
ConnectStringType= 1
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=autoxtsz.mdb;Persist Security Info=False;Jet OLEDB:Database Password=ZH69Y11Jun24"
OLEDBString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=autoxtsz.mdb;Persist Security Info=False;Jet OLEDB:Database Password=ZH69Y11Jun24"
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = "select * from mm"
Caption = "Adodc1"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
_Version = 393216
End
Begin VB.TextBox Text1
Height = 270
IMEMode = 3 'DISABLE
Left = 1200
PasswordChar = "*"
TabIndex = 0
Top = 360
Width = 855
End
Begin VB.Label Label3
Caption = "确认新密码"
Height = 255
Left = 240
TabIndex = 8
Top = 1365
Width = 975
End
Begin VB.Label Label2
Caption = "新 密 码"
Height = 255
Left = 240
TabIndex = 7
Top = 885
Width = 735
End
Begin VB.Label Label1
Caption = "旧 密 码"
Height = 255
Left = 240
TabIndex = 1
Top = 405
Width = 735
End
End
Attribute VB_Name = "Dialog"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub OKButton_Click()
End Sub
Private Sub Command1_Click()
If Text1 <> Text3 Then
MsgBox "旧密码错误,请重新输入!", vbOKOnly Or vbExclamation, "错误"
Text1.SetFocus
Text1.SelStart = 0
Text1.SelLength = Len(Text1.Text)
Exit Sub
End If
If Len(Text2) <> 6 Or Len(Text4) <> 6 Then
MsgBox "密码必须是六位!", vbOKOnly Or vbExclamation, "错误"
Text4 = ""
Text2.SetFocus
Text2.SelStart = 0
Text2.SelLength = Len(Text2.Text)
Exit Sub
End If
If Text1 = Text3 And Text2 = Text4 Then
Text3.Text = Text4.Text
Adodc1.Recordset.MoveNext
Adodc1.Recordset.MovePrevious
MsgBox "密码修改成功!", vbOKOnly Or vbInformation, "系统信息"
Unload Me
ElseIf Text2 <> Text4 Then
MsgBox "新密码不一致,请重新输入!", vbOKOnly Or vbExclamation, "错误"
Text4 = ""
Text2.SetFocus
Text2.SelStart = 0
Text2.SelLength = Len(Text1.Text)
End If
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -