?? frmlogin.frm
字號:
VERSION 5.00
Begin VB.Form frmlogin
BorderStyle = 1 'Fixed Single
Caption = "Form1"
ClientHeight = 3585
ClientLeft = 45
ClientTop = 435
ClientWidth = 4680
ControlBox = 0 'False
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 3585
ScaleWidth = 4680
StartUpPosition = 3 '窗口缺省
Begin VB.CommandButton Command2
Caption = "取消"
BeginProperty Font
Name = "新宋體"
Size = 9
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 2760
TabIndex = 6
Top = 3000
Width = 855
End
Begin VB.CommandButton Command1
Caption = "確定"
BeginProperty Font
Name = "新宋體"
Size = 9
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 1200
TabIndex = 5
Top = 3000
Width = 975
End
Begin VB.TextBox Text2
Height = 375
IMEMode = 3 'DISABLE
Left = 2040
PasswordChar = "*"
TabIndex = 4
Top = 2280
Width = 1575
End
Begin VB.TextBox Text1
Height = 375
IMEMode = 3 'DISABLE
Left = 2040
TabIndex = 3
Top = 1560
Width = 1575
End
Begin VB.Label Label4
Alignment = 2 'Center
Caption = "密碼"
BeginProperty Font
Name = "宋體"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 600
TabIndex = 2
Top = 2280
Width = 1215
End
Begin VB.Label Label2
Alignment = 2 'Center
Caption = "用戶名"
BeginProperty Font
Name = "宋體"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 600
TabIndex = 1
Top = 1680
Width = 1215
End
Begin VB.Label Label1
Caption = "學(xué)生住宿信息查詢系統(tǒng)"
BeginProperty Font
Name = "華文琥珀"
Size = 18
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 975
Left = 480
TabIndex = 0
Top = 360
Width = 3975
End
End
Attribute VB_Name = "frmlogin"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public password As String
Public username As String
Private Sub Command1_Click()
Dim txtSQL As String
Dim MsgText As String
Dim mrc As ADODB.Recordset
If Text1.Text = "" Then
MsgBox (" 用戶名不能空")
Text1.SetFocus
Else
Set mrc = New ADODB.Recordset
txtSQL = Trim("select * from userlogin where username= '" & Trim(Text1.Text) & " ' ")
Set mrc = ExecuteSQL(txtSQL, MsgText)
If mrc.EOF = True Then
MsgBox (MsgText)
End
End If
If Trim(mrc.Fields("username").Value) = Trim(Text1.Text) And Trim(mrc.Fields("password").Value) = Trim(Text2.Text) Then
If Not mrc.EOF Then
Me.Hide
frmmain.Show
username = Trim(Text1.Text)
password = Trim(Text2.Text)
End If
Else
MsgBox "密碼錯誤!輸入密碼。 "
End If
Set mrc = Nothing
End If
End Sub
Private Sub Command2_Click()
End
End Sub
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -