?? frmlogin.frm
字號(hào):
VERSION 5.00
Begin VB.Form frmLogin
BorderStyle = 1 'Fixed Single
Caption = "身份驗(yàn)證"
ClientHeight = 2940
ClientLeft = 5625
ClientTop = 5235
ClientWidth = 7365
BeginProperty Font
Name = "宋體"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Icon = "frmLogin.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 2940
ScaleWidth = 7365
Begin VB.Frame Frame1
BeginProperty Font
Name = "宋體"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 1815
Left = 120
TabIndex = 0
Top = 960
Width = 7095
Begin VB.CommandButton cmdQuit
Caption = "取消(&C)"
BeginProperty Font
Name = "宋體"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 5640
Style = 1 'Graphical
TabIndex = 9
Top = 960
Width = 1095
End
Begin VB.CommandButton cmdEnter
Caption = "登錄(&E)"
BeginProperty Font
Name = "宋體"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 5640
Style = 1 'Graphical
TabIndex = 8
Top = 360
Width = 1095
End
Begin VB.TextBox txtPassword
BeginProperty Font
Name = "宋體"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 350
IMEMode = 3 'DISABLE
Left = 2760
PasswordChar = "*"
TabIndex = 2
Top = 960
Width = 2655
End
Begin VB.TextBox txtUser
BeginProperty Font
Name = "宋體"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 350
Left = 2760
TabIndex = 1
Top = 360
Width = 2655
End
Begin VB.Label Label4
BackColor = &H00808080&
Caption = "Label4"
BeginProperty Font
Name = "宋體"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 5700
TabIndex = 11
Top = 1020
Width = 1095
End
Begin VB.Label Label3
BackColor = &H00808080&
BeginProperty Font
Name = "宋體"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 5700
TabIndex = 10
Top = 420
Width = 1095
End
Begin VB.Label Label10
BackColor = &H00808080&
Caption = "Label10"
BeginProperty Font
Name = "宋體"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 345
Left = 2820
TabIndex = 6
Top = 1020
Width = 2655
End
Begin VB.Label Label9
BackColor = &H00808080&
Caption = "Label9"
BeginProperty Font
Name = "宋體"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 345
Left = 2820
TabIndex = 5
Top = 420
Width = 2655
End
Begin VB.Label Label6
AutoSize = -1 'True
Caption = "密 碼"
BeginProperty Font
Name = "宋體"
Size = 10.5
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 210
Left = 1920
TabIndex = 4
Top = 1080
Width = 690
End
Begin VB.Label Label5
AutoSize = -1 'True
Caption = "用戶名"
BeginProperty Font
Name = "宋體"
Size = 10.5
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 210
Left = 1920
TabIndex = 3
Top = 480
Width = 675
End
Begin VB.Image Image1
Height = 1350
Left = 120
Picture = "frmLogin.frx":0442
Stretch = -1 'True
Top = 240
Width = 1545
End
End
Begin VB.Label Label7
BackStyle = 0 'Transparent
Caption = "請(qǐng)輸入正確的用戶登錄資料,如超過3次沒登錄成功則判為非法登錄!本系統(tǒng)也會(huì)隨之退出。"
ForeColor = &H000000C0&
Height = 450
Left = 240
TabIndex = 12
Top = 240
Width = 6855
End
Begin VB.Label Label1
BackColor = &H00404040&
BeginProperty Font
Name = "宋體"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 855
Left = 0
TabIndex = 7
Top = 0
Width = 7400
End
End
Attribute VB_Name = "frmLogin"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim Econt As Integer
Private Sub cmdEnter_Click()
Dim ADOrs As New Recordset
ADOrs.ActiveConnection = ADOcn
If txtUser.Text = "" Or txtPassword.Text = "" Then
MsgBox "用戶名或密碼不能為空!!!"
txtUser.Text = "": txtPassword.Text = ""
txtUser.SetFocus
Econt = Econt + 1
If Econt >= 4 Then
MsgBox "非法登錄!!!本系統(tǒng)將退出。"
End
End If
Else
ADOrs.Open ("select * from 用戶表 where user_ID='" & txtUser.Text & "'" + " and user_Password='" & EDcode$(txtPassword.Text, 12358) & "'")
'過濾敏感字符
If (InStr(txtUser.Text, "'") <> 0) Or (InStr(txtPassword.Text, "'") <> 0) Then MsgBox "有敏感字符!本系統(tǒng)將退出!!!", vbOKOnly, "非法登錄": End
If Not ADOrs.EOF Then
ADOrs.Close
User = txtUser.Text
Unload Me
frmMain.Show
Else
MsgBox "用戶名或密碼錯(cuò)誤!!!"
txtUser.Text = "": txtPassword.Text = ""
txtUser.SetFocus
Econt = Econt + 1
If Econt >= 4 Then
MsgBox "非法登錄!!!本系統(tǒng)將退出。"
End
End If
End If
End If
End Sub
Private Sub cmdEnter_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
Call cmdMouseDown(cmdEnter)
End Sub
Private Sub cmdEnter_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
cmdEnter.BackColor = &H8000000D
End Sub
Private Sub cmdEnter_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
Call cmdMouseUp(cmdEnter)
End Sub
Private Sub cmdQuit_Click()
End
End Sub
Private Sub cmdQuit_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
Call cmdMouseDown(cmdQuit)
End Sub
Private Sub cmdQuit_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
cmdQuit.BackColor = &H8000000D
End Sub
Private Sub cmdQuit_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
Call cmdMouseUp(cmdQuit)
End Sub
Private Sub Form_Load()
Econt = 1
End Sub
Private Sub Frame1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
cmdEnter.BackColor = &H8000000F
cmdQuit.BackColor = &H8000000F
End Sub
Private Sub txtPassword_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then Call cmdEnter_Click
End Sub
Private Sub txtUser_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then txtPassword.SetFocus
End Sub
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -