?? frmlogin.frm
字號:
VERSION 5.00
Begin VB.Form frmLogin
Appearance = 0 'Flat
AutoRedraw = -1 'True
BackColor = &H80000005&
BorderStyle = 0 'None
Caption = "用戶登錄"
ClientHeight = 4965
ClientLeft = 4920
ClientTop = 2595
ClientWidth = 6075
Icon = "frmLogin.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 331
ScaleMode = 3 'Pixel
ScaleWidth = 405
ShowInTaskbar = 0 'False
Begin 計算機圖書管理系統2008.xp_canvas xp_canvas1
Height = 3060
Left = 0
TabIndex = 4
Top = 1200
Width = 6135
_extentx = 10821
_extenty = 5398
Begin VB.TextBox Text1
BeginProperty Font
Name = "宋體"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 360
Left = 2760
TabIndex = 1
Text = "reader"
Top = 480
Width = 1935
End
Begin VB.TextBox Text2
BeginProperty Font
Name = "宋體"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 360
IMEMode = 3 'DISABLE
Left = 2760
PasswordChar = "*"
TabIndex = 2
Text = "000"
Top = 1200
Width = 1935
End
Begin VB.Frame Frame1
BackColor = &H00C0FFFF&
BorderStyle = 0 'None
ForeColor = &H000000FF&
Height = 1935
Left = 720
TabIndex = 5
Top = 0
Width = 4575
Begin VB.Label Label2
BackColor = &H00C0FFFF&
Caption = " 密 碼:"
BeginProperty Font
Name = "宋體"
Size = 12
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 240
TabIndex = 7
Top = 1320
Width = 1455
End
Begin VB.Label Label1
BackColor = &H00C0FFFF&
Caption = " 用 戶 名:"
BeginProperty Font
Name = "宋體"
Size = 12
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 240
TabIndex = 6
Top = 480
Width = 1455
End
End
Begin 計算機圖書管理系統2008.xpcmdbutton xpcmdbutton2
Height = 495
Left = 3360
TabIndex = 0
Top = 2040
Width = 1575
_extentx = 2778
_extenty = 873
font = "frmLogin.frx":0CCA
End
Begin 計算機圖書管理系統2008.xpcmdbutton xpcmdbutton1
Height = 495
Left = 1200
TabIndex = 3
Top = 2040
Width = 1575
_extentx = 2778
_extenty = 873
font = "frmLogin.frx":0CEE
End
End
Begin 計算機圖書管理系統2008.xptopbuttons xptopbuttons1
Height = 315
Left = 5640
ToolTipText = "關閉系統"
Top = 120
Width = 315
_extentx = 556
_extenty = 556
End
Begin 計算機圖書管理系統2008.xptopbuttons xptopbuttons2
Height = 315
Index = 1
Left = 5280
Top = 120
Width = 315
_extentx = 556
_extenty = 556
value = 2
End
Begin VB.Image Image2
Height = 1545
Left = 0
Picture = "frmLogin.frx":0D12
Top = 4200
Width = 12765
End
Begin VB.Image Image1
Height = 1410
Left = 0
Picture = "frmLogin.frx":2BAEC
Top = 0
Width = 7215
End
End
Attribute VB_Name = "frmLogin"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Form_Load() '連接用戶表
Call open_connection("user_table")
xpcmdbutton1.Caption = "登陸"
xpcmdbutton2.Caption = "注銷"
End Sub
Private Sub Image1_Click()
End Sub
Private Sub xpcmdbutton1_Click() '登錄系統
Dim sql As String
If Trim(Text1.Text) = "" Then '如果文本框為空,則給出提示
frmMsg.Show
frmMsg.notice.Visible = True
frmMsg.Text1.Text = "請輸入用戶登錄賬號!"
Exit Sub
Else
sql = "select * from user_table where [登錄名]='" & Trim(Text1.Text) & "'" '查找用戶登錄名
rst.Close
rst.Open sql, con, adOpenDynamic, adLockOptimistic
If rst.RecordCount <= 0 Then
frmMsg.Show
frmMsg.error.Visible = True
frmMsg.Text1.Text = "用戶名不存在!"
Exit Sub
End If
'用戶合法性檢測并賦予一定的權限級別
If LCase(Trim(rst![登錄名])) = LCase(Trim(Text1.Text)) Then
If Trim(rst![密碼]) = Trim(Text2.Text) Then
privilege = rst![權限]
Call check_privage(privilege) '權限分配
Else
frmMsg.Show
frmMsg.error.Visible = True
frmMsg.Text1.Text = "密碼錯誤,請重新輸入!"
Exit Sub
End If
End If
End If
End Sub
Private Sub xpcmdbutton2_Click() '退出系統
End
End Sub
Private Sub xptopbuttons1_Click()
End
End Sub
Private Sub xptopbuttons2_Click(Index As Integer)
Me.WindowState = 1
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -