?? form3.frm
字號:
VERSION 5.00
Begin VB.Form Form3
Caption = "Form3"
ClientHeight = 4635
ClientLeft = 60
ClientTop = 345
ClientWidth = 7185
LinkTopic = "Form3"
ScaleHeight = 4635
ScaleWidth = 7185
StartUpPosition = 3 '窗口缺省
Begin VB.TextBox Text2
Height = 495
IMEMode = 3 'DISABLE
Left = 2520
PasswordChar = "*"
TabIndex = 2
Top = 2160
Width = 1815
End
Begin VB.Data Data1
Connect = "Access 2000;"
DatabaseName = "db1.mdb"
DefaultCursorType= 0 '缺省游標
DefaultType = 2 '使用 ODBC
Exclusive = 0 'False
Height = 615
Left = 2400
Options = 0
ReadOnly = 0 'False
RecordsetType = 1 'Dynaset
RecordSource = "表1"
Top = 3360
Width = 2775
End
Begin VB.CommandButton Command1
Caption = "登錄"
Height = 615
Left = 5040
TabIndex = 1
Top = 720
Width = 1215
End
Begin VB.TextBox Text1
DataSource = "Data1"
Height = 375
Left = 2640
TabIndex = 0
Top = 840
Width = 1815
End
Begin VB.Label Label2
Caption = "密碼:"
BeginProperty Font
Name = "宋體"
Size = 14.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 1200
TabIndex = 4
Top = 2160
Width = 735
End
Begin VB.Label Label1
Caption = "用戶名:"
BeginProperty Font
Name = "宋體"
Size = 15.75
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 1200
TabIndex = 3
Top = 840
Width = 1215
End
End
Attribute VB_Name = "Form3"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Data1.Recordset.FindFirst "用戶名='" & Trim(Text1) & "' and 密碼='" & Trim(Text2) & "'"
If Data1.Recordset.NoMatch Then
i = i + 1
If i < 3 Then
MsgBox "密碼錯誤或用戶不存在"
Else
MsgBox "三次錯"
End
End If
Else
MsgBox "登錄成功"
id_mark = Data1.Recordset.標識
Form6.Show
End If
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -