📄 登陆.frm
字号:
VERSION 5.00
Begin VB.Form 登陆
BackColor = &H00FFFF00&
Caption = "登陆"
ClientHeight = 4275
ClientLeft = 3000
ClientTop = 1920
ClientWidth = 5895
ControlBox = 0 'False
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 4275
ScaleWidth = 5895
Begin VB.CommandButton Command3
Caption = "注册"
Height = 495
Left = 360
TabIndex = 7
Top = 3120
Width = 1215
End
Begin VB.Data Data1
Caption = "Data1"
Connect = "Access"
DatabaseName = "图书系统.mdb"
DefaultCursorType= 0 '缺省游标
DefaultType = 2 '使用 ODBC
Exclusive = 0 'False
Height = 285
Left = 2160
Options = 0
ReadOnly = 0 'False
RecordsetType = 1 'Dynaset
RecordSource = "会员资料"
Top = 3720
Visible = 0 'False
Width = 1140
End
Begin VB.CommandButton Command2
Caption = "取消"
Height = 495
Left = 4200
TabIndex = 6
Top = 3120
Width = 1215
End
Begin VB.CommandButton Command1
Caption = "确定"
Height = 495
Left = 2280
TabIndex = 5
Top = 3120
Width = 1215
End
Begin VB.TextBox Text2
Height = 375
IMEMode = 3 'DISABLE
Left = 1920
PasswordChar = "*"
TabIndex = 4
Top = 2160
Width = 3015
End
Begin VB.TextBox Text1
Height = 375
Left = 1920
TabIndex = 3
Top = 1560
Width = 3015
End
Begin VB.Label Label3
BackColor = &H00FFFF00&
Caption = "会员密码"
Height = 375
Left = 960
TabIndex = 2
Top = 2280
Width = 855
End
Begin VB.Label Label2
BackColor = &H00FFFF00&
Caption = "会员帐号"
Height = 375
Left = 960
TabIndex = 1
Top = 1680
Width = 855
End
Begin VB.Label Label1
Alignment = 2 'Center
BackColor = &H00FFFF00&
Caption = "欢迎光临"
BeginProperty Font
Name = "华文彩云"
Size = 36
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H000000FF&
Height = 855
Left = 600
TabIndex = 0
Top = 480
Width = 4695
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()
Data1.Recordset.MoveFirst
Do Until Data1.Recordset.EOF
If Data1.Recordset.Fields(0) = Text1.Text Then
If Data1.Recordset.Fields(1) = Text2.Text Then
主窗体.Show
Unload Me
Exit Sub
End If
End If
Data1.Recordset.MoveNext
Loop
MsgBox "密码错误", vbOKOnly, "消息"
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
Private Sub Command3_Click()
注册.Show
注册.Data1.Visible = False
注册.Data1.Recordset.AddNew
Unload Me
End Sub
Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Command1_Click
End If
End Sub
Private Sub Text2_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Command1_Click
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -