📄 frmforgotpass.frm
字号:
Caption = "生日:"
BeginProperty Font
Name = "Arial"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 225
Left = 1380
TabIndex = 10
Top = 2520
Width = 405
End
Begin VB.Label Label5
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "E-Mail:"
BeginProperty Font
Name = "Arial"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 225
Left = 1230
TabIndex = 8
Top = 2160
Width = 555
End
Begin VB.Label Label4
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "名:"
BeginProperty Font
Name = "Arial"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 225
Left = 1560
TabIndex = 6
Top = 1800
Width = 225
End
Begin VB.Label Label3
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "姓:"
BeginProperty Font
Name = "Arial"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 225
Left = 1560
TabIndex = 4
Top = 1440
Width = 225
End
Begin VB.Line Line3
BorderStyle = 5 'Dash-Dot-Dot
X1 = 120
X2 = 4800
Y1 = 960
Y2 = 960
End
Begin VB.Label Label2
Alignment = 1 'Right Justify
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "用户名:"
BeginProperty Font
Name = "Arial"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 225
Left = 1200
TabIndex = 2
Top = 1080
Width = 585
End
Begin VB.Label Label1
Alignment = 2 'Center
BackStyle = 0 'Transparent
Caption = "请提供下面的一些基本信息,如果正确,便会获取密码"
BeginProperty Font
Name = "Arial"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 120
TabIndex = 1
Top = 360
Width = 4695
End
Begin VB.Line Line2
BorderWidth = 2
X1 = 4920
X2 = 4920
Y1 = 240
Y2 = 5520
End
Begin VB.Line Line1
BorderWidth = 2
X1 = 15
X2 = 15
Y1 = 240
Y2 = 5520
End
Begin VB.Label lblCaption
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "Hirdhav Digital Diary - Forgot Password?"
Height = 225
Left = 200
TabIndex = 0
Top = 10
Width = 3495
End
Begin VB.Shape shapeCaption
BackStyle = 1 'Opaque
BorderWidth = 2
Height = 255
Left = 15
Top = 15
Width = 4920
End
End
Attribute VB_Name = "frmForgotPass"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public MyPass As String
Private Sub Form_Load()
shapeCancel.BackColor = RGB(145, 155, 100)
Me.BackColor = RGB(145, 155, 100)
shapeCaption.BackColor = vbBlack
lblCaption.ForeColor = RGB(145, 155, 100)
txtUserName.BackColor = RGB(145, 155, 100)
txtFName.BackColor = RGB(145, 155, 100)
txtLName.BackColor = RGB(145, 155, 100)
txtEMail.BackColor = RGB(145, 155, 100)
txtBDate.BackColor = RGB(145, 155, 100)
txtQuestion.BackColor = RGB(145, 155, 100)
txtAnswer.BackColor = RGB(145, 155, 100)
shapeRP.BackColor = RGB(145, 155, 100)
lblYourPass.Caption = ""
txtUserName.Text = frmLogin.txtUserName.Text
txtUserName.SelLength = Len(txtUserName.Text)
End Sub
Private Sub lblCancelSupport_Click()
frmLogin.Show
Unload Me
End Sub
Private Sub lblCancelSupport_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
lblCancel.ForeColor = RGB(145, 155, 100)
shapeCancel.BackColor = vbBlack
End Sub
Private Sub lblCancelSupport_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
shapeCancel.BackColor = RGB(145, 155, 100)
lblCancel.ForeColor = vbBlack
End Sub
Private Sub lblCaptionSupport_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
DragForm Me
End Sub
Private Sub lblRPSupport_Click()
Dim db As Database
Dim ReS As Recordset
Set db = OpenDatabase(App.Path + "\HDD.dat")
Set ReS = db.OpenRecordset("Users")
On Error GoTo HanErr:
Do
If ReS("Username") = txtUserName.Text And ReS("FirstName") = txtFName.Text And _
ReS("LastName") = txtLName.Text And ReS("BDate") = txtBDate.Text And _
ReS("EMail") = txtEMail.Text And ReS("Question") = txtQuestion.Text And _
ReS("Answer") = txtAnswer.Text Then
MyPass = ReS("Password")
txtPass.Text = MyPass
ShowPass
Exit Sub
End If
ReS.MoveNext
Loop
HanErr:
If Err.Number = 3021 Then
lblYourPass.Caption = "N/A"
HDDMsgBox "Sorry, informations are not matching."
End If
End Sub
Private Sub lblRPSupport_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
lblRP.ForeColor = RGB(145, 155, 100)
shapeRP.BackColor = vbBlack
End Sub
Private Sub lblRPSupport_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
lblRP.ForeColor = vbBlack
shapeRP.BackColor = RGB(145, 155, 100)
End Sub
Private Sub txtAnswer_KeyPress(KeyAscii As Integer)
KeyAscii = Asc(UCase(Chr(KeyAscii)))
End Sub
Private Sub txtQuestion_KeyPress(KeyAscii As Integer)
KeyAscii = Asc(UCase(Chr(KeyAscii)))
End Sub
Private Sub txtUserName_KeyPress(KeyAscii As Integer)
KeyAscii = Asc(LCase(Chr(KeyAscii)))
End Sub
Function ShowPass()
Dim EachLetter
Dim SelStart
Dim SelLen
Dim AllLetters
SelStart = 0
SelLen = 1
Do
For I = 97 To 122
txtPass.SetFocus
txtPass.SelStart = SelStart
txtPass.SelLength = SelLen
EachLetter = Chr(I)
If SelStart = Len(txtPass.Text) Then
Exit Function
End If
If EachLetter = txtPass.SelText Then
txtPass.SetFocus
txtPass.SelStart = SelStart
txtPass.SelLength = SelLen
SelStart = SelStart + 1
AllLetters = AllLetters + EachLetter
lblYourPass.Caption = AllLetters
End If
Next I
Loop
End Function
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -