?? form1.frm
字號:
VERSION 5.00
Begin VB.Form pass
BackColor = &H80000001&
Caption = "圖書管理系統 v1.0"
ClientHeight = 2940
ClientLeft = 3465
ClientTop = 2385
ClientWidth = 4215
ForeColor = &H80000017&
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 2940
ScaleWidth = 4215
Begin VB.TextBox uid
Height = 375
IMEMode = 3 'DISABLE
Left = 1440
TabIndex = 7
Top = 960
Width = 1575
End
Begin VB.CommandButton 取消
Caption = "取消"
Height = 375
Index = 1
Left = 2400
TabIndex = 2
Top = 2400
Width = 735
End
Begin VB.CommandButton 確定
Caption = "確定"
Height = 375
Index = 0
Left = 1200
TabIndex = 1
Top = 2400
Width = 735
End
Begin VB.Frame Frame1
BackColor = &H80000001&
Height = 1695
Left = 600
TabIndex = 0
Top = 600
Width = 2895
Begin VB.TextBox Password
Height = 375
IMEMode = 3 'DISABLE
Left = 840
PasswordChar = "*"
TabIndex = 3
Top = 960
Width = 1575
End
Begin VB.Label Label2
Alignment = 2 'Center
BackColor = &H80000001&
Caption = "密碼"
Height = 255
Left = 120
TabIndex = 5
Top = 1080
Width = 495
End
Begin VB.Label Label1
BackColor = &H80000001&
Caption = "用戶"
Height = 255
Left = 240
TabIndex = 4
Top = 480
Width = 495
End
End
Begin VB.Label Label3
Alignment = 2 'Center
Appearance = 0 'Flat
BackColor = &H80000001&
Caption = "圖書管理系統登錄"
BeginProperty Font
Name = "宋體"
Size = 14.25
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H80000008&
Height = 435
Left = 840
TabIndex = 6
Top = 240
Width = 2535
End
End
Attribute VB_Name = "pass"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public n As Integer
Private Sub Form_Activate()
uid.SetFocus
End Sub
Private Sub Form_Load()
n = 0
End Sub
Private Sub 取消_Click(Index As Integer)
Unload Me
End Sub
Private Sub 確定_Click(Index As Integer)
Dim mrc As ADODB.Recordset
Dim txtsql As String
Call deldata
Call insertdata
txtsql = "select * from 登陸表 where 用戶名='" & Trim$(uid.Text) & "'" & " and 密碼='" & Trim$(Password.Text) + "'"
Set mrc = exesql(txtsql)
If mrc.RecordCount = 0 Then
n = n + 1
If n < 3 Then
MsgBox "沒有此用戶,請重試", vbOKOnly + vbExclamation, "信息提示"
uid.Text = ""
Password.Text = ""
uid.SetFocus
Else
MsgBox "已3次登陸失敗,退出系統", vbOKOnly + vbExclamation, "信息提示"
mrc.Close
Unload Me
End If
Else
mrc.Close
Unload Me
'MsgBox "調入主窗口", vbOKOnly + vbExclamation, "信息提示"
Menu.Show
End If
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -