?? loginsys.frm
字號:
VERSION 5.00
Begin VB.Form LoginSys
Caption = "圖書管理信息系統"
ClientHeight = 2670
ClientLeft = 60
ClientTop = 345
ClientWidth = 5010
Icon = "LoginSys.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
ScaleHeight = 2670
ScaleWidth = 5010
StartUpPosition = 2 '屏幕中心
Begin VB.CommandButton cmdOkCancel
Cancel = -1 'True
Caption = "取消(&C)"
BeginProperty Font
Name = "宋體"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Index = 1
Left = 3240
Style = 1 'Graphical
TabIndex = 5
Top = 1920
Width = 855
End
Begin VB.CommandButton cmdOkCancel
Caption = "確定(&E)"
Default = -1 'True
BeginProperty Font
Name = "宋體"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Index = 0
Left = 840
Style = 1 'Graphical
TabIndex = 4
Top = 1920
Width = 855
End
Begin VB.TextBox txtPass
BeginProperty Font
Name = "宋體"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
IMEMode = 3 'DISABLE
Left = 1920
PasswordChar = "*"
TabIndex = 3
Text = "Text1"
Top = 1080
Width = 1815
End
Begin VB.ComboBox comPer
BeginProperty Font
Name = "宋體"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 300
Left = 1920
TabIndex = 2
Text = "Combo1"
Top = 480
Width = 1815
End
Begin VB.Label Label1
AutoSize = -1 'True
BackColor = &H8000000A&
BackStyle = 0 'Transparent
Caption = "密 碼"
BeginProperty Font
Name = "宋體"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00000000&
Height = 180
Index = 1
Left = 720
TabIndex = 1
Top = 1200
Width = 540
End
Begin VB.Label Label1
AutoSize = -1 'True
BackColor = &H8000000A&
BackStyle = 0 'Transparent
Caption = "管理員"
BeginProperty Font
Name = "宋體"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00000000&
Height = 180
Index = 0
Left = 720
TabIndex = 0
Top = 480
Width = 540
End
End
Attribute VB_Name = "LoginSys"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim Asc() As Integer
Dim db As Database
Dim rst As Recordset
Dim Rec As Integer
Private Sub cmdOkCancel_Click(Index As Integer)
Dim i As Integer
i = 0
Select Case Index
Case 0
If txtPass.Text = "" Or comPer.Text = "" Then
MsgBox "請選擇用戶名或輸入密碼!", 0 + 48, "提示"
txtPass.SetFocus
Exit Sub
End If
If Val(txtPass.Text) = Asc(comPer.ListIndex) Then
'MsgBox "正確"
Libadmin = comPer.Text
Mainfrm.Show
Unload Me
Else
MsgBox "密碼錯誤,請重試!", 0 + 16, "錯誤"
txtPass.SetFocus
Exit Sub
End If
Case 1
Unload Me
End Select
End Sub
Private Sub Form_Load()
Dim i As Integer
Set db = Workspaces(0).OpenDatabase(App.Path & "\DataBase\BookMIS.mdb", False)
Set rst = db.OpenRecordset("Pass", dbOpenTable)
rst.MoveLast
Rec = rst.RecordCount
ReDim Asc(Rec - 1)
rst.MoveFirst
For i = 1 To Rec
comPer.AddItem rst.Fields("名稱")
Asc(i - 1) = Val(rst.Fields("密碼"))
rst.MoveNext
If rst.EOF Then Exit For
Next
comPer.Text = ""
txtPass.Text = ""
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -