📄 frmuser.frm
字号:
VERSION 5.00
Begin VB.Form frmUser
Caption = "Form1"
ClientHeight = 4440
ClientLeft = 60
ClientTop = 345
ClientWidth = 4575
LinkTopic = "Form1"
MDIChild = -1 'True
ScaleHeight = 4440
ScaleWidth = 4575
Begin VB.TextBox txtOldName
Height = 270
Left = 1320
TabIndex = 11
Top = 360
Width = 1935
End
Begin VB.CommandButton cmdCancel
Caption = "取 消"
Height = 375
Left = 2040
TabIndex = 9
Top = 3600
Width = 975
End
Begin VB.CommandButton cmdOk
Caption = "确认修改"
Height = 375
Left = 480
TabIndex = 8
Top = 3600
Width = 975
End
Begin VB.TextBox txtCheck
Height = 270
IMEMode = 3 'DISABLE
Left = 1320
PasswordChar = "*"
TabIndex = 7
Top = 2760
Width = 1935
End
Begin VB.TextBox txtNewPassword
Height = 270
IMEMode = 3 'DISABLE
Left = 1320
PasswordChar = "*"
TabIndex = 6
Top = 2160
Width = 1935
End
Begin VB.TextBox txtOldPassword
Height = 270
IMEMode = 3 'DISABLE
Left = 1320
PasswordChar = "*"
TabIndex = 5
Top = 1440
Width = 1935
End
Begin VB.TextBox txtNewName
Height = 270
Left = 1320
TabIndex = 4
Top = 840
Width = 1935
End
Begin VB.Label Label5
Caption = "旧用户名"
Height = 255
Left = 360
TabIndex = 10
Top = 360
Width = 855
End
Begin VB.Label Label4
Caption = "密码确认"
Height = 255
Left = 360
TabIndex = 3
Top = 2880
Width = 855
End
Begin VB.Label Label3
Caption = "新密码"
Height = 255
Left = 360
TabIndex = 2
Top = 2280
Width = 735
End
Begin VB.Label Label2
Caption = "旧密码"
Height = 255
Left = 360
TabIndex = 1
Top = 1560
Width = 735
End
Begin VB.Label Label1
Caption = "新用户名"
Height = 255
Left = 360
TabIndex = 0
Top = 960
Width = 735
End
End
Attribute VB_Name = "frmUser"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Const MaxLogTimes As Integer = 3
Private Sub cmdCancel_Click()
Unload Me
End Sub
Private Sub cmdOk_Click()
Dim intChecked As String
Dim strName As String, strPassword As String
Static intLogTimes As Integer
intLogTimes = intLogTimes + 1
If intLogTimes > MaxLogTimes Then
MsgBox "你已经超过允许的登陆验证次数!" & vbCr & "应用程序将结束!", vbCritical, "登陆验证"
End
Else
strName = Trim(txtOldName.Text)
strPassword = Trim(txtOldPassword.Text)
Select Case Check_Password(strName, strPassword)
Case 0
MsgBox "旧用户名错误,请检查用户名输入是否正确!", vbCritical, "通知"
txtUserName.SetFocus
'txtUserName.SelStart
'txtUserName.SelLength = Len(txtUserName.Text)
Case 1
MsgBox "旧密码错误,请重新输入!", vbCritical, "通知"
txtOldPassword.Text = ""
txtOldPassword.SetFocus
Case 2
If txtNewName.Text <> "" And txtNewPassword.Text <> "" And txtCheck.Text <> "" Then
If txtNewPassword.Text = txtCheck.Text Then
Call InData(txtNewName.Text, txtNewPassword.Text, txtOldName)
MsgBox "成功修改用户信息", vbInformation, "通知"
Else
MsgBox "密码确认不正确,请检查", vbCritical, "通知"
txtNewPassword.Text = ""
txtCheck.Text = ""
txtNewPassword.SetFocus
End If
Else
If txtNewName.Text = "" Then
MsgBox "请输入新用户名", vbCritical, "通知"
txtNewName.SetFocus
ElseIf txtNewPassword.Text = "" Then
MsgBox "请输入新密码", vbCritical, "通知"
Else
MsgBox "请输入确认密码", vbCritical, "通知"
End If
End If
Case Else
MsgBox "修改未正常完成!请重新运行登陆程序," & vbCrLf & "如果仍不能修改,请报告系统管理员!", vbCritical, "通知"
End Select
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -