?? frmlogin.frm
字號:
VERSION 5.00
Begin VB.Form frmLogin
Appearance = 0 'Flat
AutoRedraw = -1 'True
BackColor = &H80000005&
BorderStyle = 0 'None
Caption = "用戶登錄"
ClientHeight = 4500
ClientLeft = 4920
ClientTop = 2595
ClientWidth = 6075
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 300
ScaleMode = 3 'Pixel
ScaleWidth = 405
ShowInTaskbar = 0 'False
Begin Project1.xp_canvas xp_canvas1
Height = 4500
Left = 0
TabIndex = 4
Top = 0
Width = 6135
_ExtentX = 10821
_ExtentY = 11033
Caption = "用戶登錄"
Icon = "frmLogin.frx":0000
Begin VB.TextBox Text1
BeginProperty Font
Name = "宋體"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 3000
TabIndex = 1
Text = "Reader"
Top = 1200
Width = 1815
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 = 375
IMEMode = 3 'DISABLE
Left = 3000
PasswordChar = "*"
TabIndex = 2
Text = "111"
Top = 2160
Width = 1815
End
Begin VB.Frame Frame1
Height = 2295
Left = 600
TabIndex = 5
Top = 720
Width = 4575
Begin VB.Label Label2
Caption = " 密 碼"
BeginProperty Font
Name = "宋體"
Size = 12
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 480
TabIndex = 7
Top = 1440
Width = 1455
End
Begin VB.Label Label1
Caption = " 用 戶 名"
BeginProperty Font
Name = "宋體"
Size = 12
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 480
TabIndex = 6
Top = 480
Width = 1455
End
End
Begin Project1.xpcmdbutton xpcmdbutton2
Height = 495
Left = 3240
TabIndex = 0
Top = 3360
Width = 1575
_ExtentX = 2778
_ExtentY = 873
Caption = "退出系統"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋體"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
End
Begin Project1.xpcmdbutton xpcmdbutton1
Height = 495
Left = 1080
TabIndex = 3
Top = 3360
Width = 1575
_ExtentX = 2778
_ExtentY = 873
Caption = "登錄系統"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋體"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
End
Begin Project1.xptopbuttons xptopbuttons1
Height = 315
Left = 5760
ToolTipText = "關閉系統"
Top = 120
Width = 315
_ExtentX = 556
_ExtentY = 556
End
Begin Project1.xphelp xphelp1
Height = 315
Left = 5400
ToolTipText = "幫助"
Top = 120
Width = 315
_ExtentX = 556
_ExtentY = 556
End
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")
End Sub
Private Sub Form_Resize()
xp_canvas1.Height = Me.ScaleHeight
xp_canvas1.Width = Me.ScaleWidth
xp_canvas1.make_trans Me
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
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -