?? form2.frm
字號:
VERSION 5.00
Begin VB.Form denglu
BorderStyle = 1 'Fixed Single
Caption = "登陸窗口"
ClientHeight = 4170
ClientLeft = 2580
ClientTop = 2010
ClientWidth = 5550
DrawStyle = 5 'Transparent
BeginProperty Font
Name = "宋體"
Size = 24
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
LinkTopic = "Form2"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 4170
ScaleWidth = 5550
Visible = 0 'False
Begin VB.CommandButton Command3
Caption = "注冊"
BeginProperty Font
Name = "宋體"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 420
Left = 3120
TabIndex = 7
Top = 2520
Width = 855
End
Begin VB.TextBox Text1
BeginProperty Font
Name = "宋體"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 420
Left = 2160
TabIndex = 6
Top = 480
Width = 1815
End
Begin VB.TextBox Text2
BeginProperty Font
Name = "宋體"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 390
IMEMode = 3 'DISABLE
Left = 2160
PasswordChar = "*"
TabIndex = 5
Top = 1035
Width = 1815
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 = 375
Left = 2220
TabIndex = 3
Top = 2550
Width = 795
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 = 360
Left = 1320
TabIndex = 2
Top = 2550
Width = 825
End
Begin VB.Label Label3
Appearance = 0 'Flat
BackColor = &H80000006&
Caption = "Label3"
ForeColor = &H80000008&
Height = 45
Left = 960
TabIndex = 4
Top = 1920
Width = 3195
End
Begin VB.Label Label2
AutoSize = -1 'True
Caption = "密碼:"
BeginProperty Font
Name = "宋體"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 240
Left = 1440
TabIndex = 1
Top = 1110
Width = 720
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "用戶名:"
BeginProperty Font
Name = "宋體"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 240
Left = 1200
TabIndex = 0
Top = 480
Width = 960
End
End
Attribute VB_Name = "denglu"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Dim conn As New ADODB.Connection
conn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\其他盤文件\VB\大作業(yè)\新建文件夾\user.mdb;Persist Security Info=False"
conn.Open
Dim rs As New Recordset
Dim i As Integer
rs.Open "SELECT 密碼, 用戶名 FROM 用戶信息", conn, 1, 1
For i = 0 To rs.RecordCount - 1
If Text2.Text = rs.Fields("密碼").Value And Text1.Text = rs.Fields("用戶名").Value Then
MsgBox "登陸成功"
MDIForm1.Show
Exit For
Else: rs.MoveNext
End If
Next i
If rs.EOF = True Then
MsgBox "登陸失敗"
End If
w = Text1.Text
Unload Me
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
Private Sub Command3_Click()
zhuce.Show
End Sub
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -