??
字號:
VERSION 5.00
Object = "{C1A8AF28-1257-101B-8FB0-0020AF039CA3}#1.1#0"; "MCI32.OCX"
Begin VB.Form 登陸
BorderStyle = 1 'Fixed Single
Caption = "圖書館管理系統(tǒng)"
ClientHeight = 3390
ClientLeft = 45
ClientTop = 435
ClientWidth = 4455
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 3390
ScaleWidth = 4455
StartUpPosition = 2 '屏幕中心
Begin VB.CommandButton Command3
Caption = "重置"
Height = 375
Left = 1680
TabIndex = 7
Top = 2640
Width = 975
End
Begin MCI.MMControl MMControl1
Height = 330
Left = 480
TabIndex = 9
Top = 3480
Visible = 0 'False
Width = 3540
_ExtentX = 6244
_ExtentY = 582
_Version = 393216
DeviceType = ""
FileName = ""
End
Begin VB.CommandButton Command2
Caption = "取消"
Height = 375
Left = 2880
TabIndex = 8
Top = 2640
Width = 975
End
Begin VB.CommandButton Command1
Caption = "登陸"
Height = 375
Left = 480
TabIndex = 6
Top = 2640
Width = 975
End
Begin VB.Frame Frame1
Caption = "用戶登陸"
Height = 1335
Left = 480
TabIndex = 1
Top = 1080
Width = 3375
Begin VB.TextBox Text2
Height = 270
IMEMode = 3 'DISABLE
Left = 1320
PasswordChar = "*"
TabIndex = 5
Text = "guest"
Top = 720
Width = 1575
End
Begin VB.TextBox Text1
Height = 270
Left = 1320
TabIndex = 4
Text = "guest"
Top = 240
Width = 1575
End
Begin VB.Label Label3
Caption = "命 令"
Height = 255
Left = 480
TabIndex = 3
Top = 720
Width = 615
End
Begin VB.Label Label2
Caption = "用戶名"
Height = 255
Left = 480
TabIndex = 2
Top = 360
Width = 615
End
End
Begin VB.Label Label1
Caption = "圖書館管理系統(tǒng)"
BeginProperty Font
Name = "華文行楷"
Size = 26.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H000000FF&
Height = 615
Left = 360
TabIndex = 0
Top = 240
Width = 3855
End
End
Attribute VB_Name = "登陸"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public n As Integer
Private Sub Command1_Click()
Dim mrc As ADODB.Recordset
txtsql = "select * from oper where 用戶名='" & _
Trim$(Text1.Text) & "' and 口令='" & Trim$(Text2.Text) + "'"
Set mrc = exesql(txtsql)
If mrc.RecordCount = 0 Then '未找到用戶記錄
n = n + 1
If n < 3 Then
MsgBox "沒有這個用戶,繼續(xù)登陸", vbOKOnly + vbExclamation, "信息提示"
Text1.Text = ""
Text2.Text = ""
Text1.SetFocus
Else
MsgBox "已登陸失敗三次,退出系統(tǒng)", vbOKOnly + vbExclamation, "信息提示"
mrc.Close
Unload Me
End If
Else '找到合法用戶記錄
userlevel = Trim(mrc.Fields("級別"))
mrc.Clone
Unload Me
菜單.Show '調用menu窗體
End If
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
Private Sub Command3_Click()
Text1.Text = ""
Text2.Text = ""
Text1.SetFocus
End Sub
Private Sub Form_Load()
n = 0 'n保存登陸的次數(shù)
End Sub
Private Sub Text1_KeyPress(KeyAscii As Integer)
Call endata(KeyAscii)
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -