?? pass.frm
字號:
VERSION 5.00
Begin VB.Form pass
BorderStyle = 5 'Sizable ToolWindow
Caption = "登錄窗口"
ClientHeight = 3315
ClientLeft = 60
ClientTop = 285
ClientWidth = 5295
LinkTopic = "Form1"
MaxButton = 0 'False
MDIChild = -1 'True
MinButton = 0 'False
ScaleHeight = 3315
ScaleWidth = 5295
ShowInTaskbar = 0 'False
Begin VB.Frame Frame1
Height = 3255
Index = 0
Left = 120
TabIndex = 0
Top = 0
Width = 5055
Begin VB.TextBox Text2
Height = 495
IMEMode = 3 'DISABLE
Left = 2280
PasswordChar = "*"
TabIndex = 4
Top = 1320
Width = 2175
End
Begin VB.TextBox Text1
BeginProperty Font
Name = "宋體"
Size = 14.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
IMEMode = 3 'DISABLE
Left = 2280
PasswordChar = "*"
TabIndex = 3
Top = 600
Width = 2175
End
Begin VB.CommandButton Command1
Caption = "登錄系統(tǒng)(&O)"
BeginProperty Font
Name = "宋體"
Size = 14.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 615
Left = 600
TabIndex = 2
Top = 2160
Width = 1815
End
Begin VB.CommandButton Command2
Caption = "退出系統(tǒng)(&C)"
BeginProperty Font
Name = "宋體"
Size = 14.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 615
Left = 2640
TabIndex = 1
Top = 2160
Width = 1815
End
Begin VB.Label Label1
Caption = "密 碼"
BeginProperty Font
Name = "宋體"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 600
TabIndex = 6
Top = 1440
Width = 1215
End
Begin VB.Label Label2
Caption = "用 戶 名"
BeginProperty Font
Name = "宋體"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 600
TabIndex = 5
Top = 600
Width = 1215
End
End
End
Attribute VB_Name = "pass"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
If Text1.Text = "" Then
MsgBox "請輸入用戶名!", vbOKOnly, "提示!"
Text1.SetFocus
Else
If Text2.Text = "" Then
MsgBox "請輸入密碼!", vbOKOnly, "提示!"
Text2.SetFocus
Else
txtSQL = "select * from user where 姓名='" & Text1.Text & "'" '查詢指定用戶名的記錄
Set dream = ExecuteSQL(txtSQL, Msgtext) '執(zhí)行查詢語句
If dream.EOF = True Then
MsgBox "用戶不存在,請重新輸入用戶名!", vbOKOnly + vbExclamation, "提示!"
Text1.SetFocus
Text1.Text = ""
Else
If Trim(dream.Fields(1)) = Trim(Text2.Text) Then '判斷密碼是否正確
OK = True
studentmdi.Show
pass.Hide
login.Hide
dream.Close
Else
studentmdi.Hide
MsgBox "輸入密碼不正確,請重新輸入!", 48, "警告 "
Text2.SetFocus
Text2.Text = ""
End If
End If
c = c + 1 '記載輸入密碼次數(shù)
If c = 3 Then Me.Hide
If OK Then Me.Hide
' Text1.Text = ""
Text2.Text = ""
End If
End If
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
Private Sub Form_Activate()
Text1.SetFocus
Text1.Text = ""
End Sub
Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Text2.SetFocus
End If
End Sub
Private Sub Text2_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Call Command1_Click
End If
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -