📄 frmchangpasswd.frm
字号:
VERSION 5.00
Begin VB.Form frmchangpasswd
AutoRedraw = -1 'True
BorderStyle = 1 'Fixed Single
Caption = "更改密码"
ClientHeight = 2055
ClientLeft = 45
ClientTop = 330
ClientWidth = 3615
Icon = "frmchangpasswd.frx":0000
LinkTopic = "Form1"
MDIChild = -1 'True
ScaleHeight = 2055
ScaleWidth = 3615
WhatsThisButton = -1 'True
WhatsThisHelp = -1 'True
Begin VB.TextBox T3
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
IMEMode = 3 'DISABLE
Left = 1560
MaxLength = 87
PasswordChar = "*"
TabIndex = 4
ToolTipText = "在这里输入密码"
Top = 870
Width = 1905
End
Begin VB.TextBox T2
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
IMEMode = 3 'DISABLE
Left = 1590
MaxLength = 87
PasswordChar = "*"
TabIndex = 2
ToolTipText = "在这里输入密码"
Top = 180
Width = 1905
End
Begin VB.CommandButton CMd2
Caption = "更改密码"
Default = -1 'True
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 345
Left = 1830
TabIndex = 0
ToolTipText = " 输入密码后用鼠标单击这里确认"
Top = 1560
Width = 1425
End
Begin VB.Label Label1
Caption = "确认新密码:"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 405
Left = 90
TabIndex = 3
Top = 900
Width = 1290
End
Begin VB.Label LB2
Caption = "输入6位新密码:"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 405
Left = 0
TabIndex = 1
Top = 270
Width = 1620
End
End
Attribute VB_Name = "frmchangpasswd"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub CMd2_Click()
On Error GoTo sd
Dim mima As Variant
If CMd2.Caption <> "完成" Then 'if1
If Len(Trim(T2)) <> 6 And Len(Trim(T3)) <> 6 Then
MsgBox "请输入6位密码!"
Exit Sub
End If
If Trim(T2) <> Trim(T3) Then
MsgBox "请重新确认密码!"
T3 = vbNullString
T3.SetFocus
Exit Sub
End If
Open "c:\PASSPW.PWL" For Binary Access Write As FreeFile Len = 6
Put #1, 1, T2.Text
Close
Open "c:\PASSPW.PWL" For Input As #1
If Trim(T2.Text) = Input(6, #1) Then
Close
MsgBox "密码更改成功!按<<完成>>键退出."
CMd2.Caption = "完成"
' Unload Me
'Exit Sub
Else
Close
MsgBox "请重输!"
T2.SetFocus
End If
T2 = vbNullString
T3 = vbNullString
Else 'if1
Unload Me
End If
Exit Sub
sd:
End Sub
Private Sub Form_Activate()
T2.SetFocus
End Sub
Private Sub T2_Change()
If T2 = "请输入6位密码!" Then
T2.PasswordChar = vbNullString
Else
T2.PasswordChar = "*"
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -