📄 form3.frm
字号:
VERSION 5.00
Begin VB.Form 密码找回
Caption = " 密码找回"
ClientHeight = 6930
ClientLeft = 60
ClientTop = 450
ClientWidth = 7980
BeginProperty Font
Name = "宋体"
Size = 15.75
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
LinkTopic = "Form3"
Palette = "Form3.frx":0000
Picture = "Form3.frx":1D753
ScaleHeight = 6930
ScaleWidth = 7980
StartUpPosition = 3 '窗口缺省
Begin VB.Data Data2
Caption = "Data2"
Connect = "Access 2000;"
DatabaseName = ""
DefaultCursorType= 0 '缺省游标
DefaultType = 2 '使用 ODBC
Exclusive = 0 'False
Height = 420
Left = 600
Options = 0
ReadOnly = 0 'False
RecordsetType = 1 'Dynaset
RecordSource = ""
Top = 5280
Visible = 0 'False
Width = 1140
End
Begin VB.Data Data1
Caption = "Data1"
Connect = "Access 2000;"
DatabaseName = ""
DefaultCursorType= 0 '缺省游标
DefaultType = 2 '使用 ODBC
Exclusive = 0 'False
Height = 420
Left = 120
Options = 0
ReadOnly = 0 'False
RecordsetType = 1 'Dynaset
RecordSource = ""
Top = 6480
Visible = 0 'False
Width = 1140
End
Begin VB.CommandButton Command2
Caption = "返回上一目录"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 4320
TabIndex = 8
Top = 5400
Width = 1815
End
Begin VB.CommandButton Command1
Caption = "确定"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 1920
TabIndex = 7
Top = 5400
Width = 1815
End
Begin VB.ComboBox Combo1
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 300
Left = 3360
TabIndex = 5
Text = "请选择"
Top = 2160
Width = 1215
End
Begin VB.TextBox Text2
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 3360
TabIndex = 4
Top = 3000
Width = 1935
End
Begin VB.TextBox Text1
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 3360
TabIndex = 3
Top = 1200
Width = 1935
End
Begin VB.Label Label4
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "密码返回框"
Height = 315
Left = 3120
TabIndex = 9
Top = 3960
Width = 1575
End
Begin VB.Label Label5
AutoSize = -1 'True
BackStyle = 0 'Transparent
BeginProperty Font
Name = "宋体"
Size = 18
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H000000FF&
Height = 360
Left = 1680
TabIndex = 6
Top = 360
Width = 180
End
Begin VB.Label Label3
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "答案"
Height = 315
Left = 2280
TabIndex = 2
Top = 3000
Width = 630
End
Begin VB.Label Label2
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "密码提示问题"
Height = 315
Left = 1200
TabIndex = 1
Top = 2160
Width = 1890
End
Begin VB.Label Label1
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "帐号"
Height = 315
Left = 2400
TabIndex = 0
Top = 1320
Width = 630
End
End
Attribute VB_Name = "密码找回"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
If Text2.Text = Data1.Recordset.Fields("密码A") Then
Label4.Caption = Data1.Recordset.Fields("密码")
Label5.Caption = "成功找回密码!"
Else
Label5.Caption = "SORRY !请输入正确的信息"
End If
End Sub
Private Sub Command2_Click()
密码找回.Hide
登陆.Show
End Sub
Private Sub Form_Load()
Data1.DatabaseName = "试题库.mdb"
Data1.RecordSource = "用户"
Data1.Refresh
Data2.DatabaseName = "试题库.mdb"
Data2.RecordSource = "密码Q"
Data2.Refresh
Call dateview
Text1.Text = ""
Text2.Text = ""
Label4.Caption = "密码返回框"
End Sub
Private Sub dateview()
Data2.Recordset.MoveFirst
Do Until Data2.Recordset.EOF
Combo1.AddItem Data2.Recordset.Fields("密码Q")
Data2.Recordset.MoveNext
Loop
End Sub
Private Sub Text1_LostFocus()
Data1.Recordset.FindFirst ("帐号='" & Text1.Text & "'")
If Data1.Recordset.NoMatch Then
Text1.Text = ""
inta = MsgBox("没有该帐号,输入正确的帐号!", vbYes, "温馨提示") = vbYes
Text1.SetFocus
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -