?? frmlogin.frm
字號:
VERSION 5.00
Begin VB.Form frmLogin
AutoRedraw = -1 'True
BorderStyle = 0 'None
Caption = "人員登錄"
ClientHeight = 2100
ClientLeft = 2790
ClientTop = 3045
ClientWidth = 5175
ControlBox = 0 'False
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 1240.749
ScaleMode = 0 'User
ScaleWidth = 4859.045
ShowInTaskbar = 0 'False
StartUpPosition = 2 'CenterScreen
Begin VB.CommandButton cmdCancel
Cancel = -1 'True
Caption = "取消"
Height = 390
Left = 3840
TabIndex = 6
Top = 960
Width = 1140
End
Begin VB.CommandButton cmdOK
Caption = "確定"
Default = -1 'True
Height = 390
Left = 3840
TabIndex = 5
Top = 360
Width = 1140
End
Begin VB.Frame FrameLog
Height = 1815
Left = 240
TabIndex = 0
Top = 120
Width = 3375
Begin VB.ComboBox UTypes
Height = 315
ItemData = "frmLogin.frx":0000
Left = 1560
List = "frmLogin.frx":000D
Style = 2 'Dropdown List
TabIndex = 8
Top = 1200
Width = 1455
End
Begin VB.TextBox txtPassword
Height = 285
IMEMode = 3 'DISABLE
Left = 1200
PasswordChar = "*"
TabIndex = 4
Top = 720
Width = 1725
End
Begin VB.TextBox txtUserName
Height = 285
Left = 1200
TabIndex = 3
Top = 240
Width = 1725
End
Begin VB.Label lblLabels
Caption = "人員類型"
BeginProperty Font
Name = "MS Sans Serif"
Size = 12
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 270
Index = 2
Left = 360
TabIndex = 7
Top = 1200
Width = 1080
End
Begin VB.Label lblLabels
Caption = "口令"
BeginProperty Font
Name = "MS Sans Serif"
Size = 12
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 270
Index = 1
Left = 360
TabIndex = 2
Top = 720
Width = 720
End
Begin VB.Label lblLabels
Caption = "姓名"
BeginProperty Font
Name = "MS Sans Serif"
Size = 12
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 270
Index = 0
Left = 360
TabIndex = 1
Top = 240
Width = 840
End
End
End
Attribute VB_Name = "frmLogin"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub CmdCancel_Click()
Unload Me
End Sub
Private Sub CmdOk_Click()
If txtUserName.Text = "" Then
MsgBox "請輸入姓名", vbCritical, "登錄失敗"
txtUserName.SetFocus
Exit Sub
End If
If txtPassword.Text = "" Then
MsgBox "請輸入口令", vbCritical, "登錄失敗"
txtPassword.SetFocus
Exit Sub
End If
Select Case UTypes.ListIndex
Case 0
TestUser.Log txtUserName, txtPassword, student
Case 1
TestUser.Log txtUserName, txtPassword, teacher
Case 2
TestUser.Log txtUserName, txtPassword, administrator
End Select
If Not TestUser.LogFail Then
Unload Me
Else
MsgBox "無法登錄, 請重試!", vbCritical, "用戶登錄"
txtUserName.SetFocus
SendKeys "{Home}+{End}"
End If
End Sub
Private Sub Form_Load()
UTypes.ListIndex = 0
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -