?? frmlogin.frm
字號:
VERSION 5.00
Begin VB.Form FrmLogin
BorderStyle = 1 'Fixed Single
Caption = "歡迎登陸!"
ClientHeight = 3090
ClientLeft = 45
ClientTop = 435
ClientWidth = 4680
ControlBox = 0 'False
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 3090
ScaleWidth = 4680
StartUpPosition = 2 '屏幕中心
Begin VB.Frame Frame1
BackColor = &H8000000B&
Height = 2535
Left = 360
TabIndex = 0
Top = 240
Width = 3975
Begin VB.TextBox TxtPwd
Height = 375
IMEMode = 3 'DISABLE
Left = 1560
PasswordChar = "*"
TabIndex = 6
Text = "Admin"
Top = 1200
Width = 2055
End
Begin VB.CommandButton Cmd_Cancel
BackColor = &H80000010&
Caption = "取 消"
Height = 495
Left = 2400
TabIndex = 5
Top = 1920
Width = 1215
End
Begin VB.CommandButton Cmd_OK
BackColor = &H8000000C&
Caption = "確 定"
Height = 495
Left = 360
MaskColor = &H000000C0&
TabIndex = 4
Top = 1920
Width = 1215
End
Begin VB.TextBox TxtUser
Height = 375
Left = 1560
TabIndex = 3
Text = "Admin"
Top = 360
Width = 2055
End
Begin VB.Label Label2
BackStyle = 0 'Transparent
Caption = "密 碼:"
BeginProperty Font
Name = "楷體_GB2312"
Size = 14.25
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 240
TabIndex = 2
Top = 1320
Width = 1455
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "用戶名:"
BeginProperty Font
Name = "楷體_GB2312"
Size = 14.25
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 240
TabIndex = 1
Top = 360
Width = 1335
End
End
End
Attribute VB_Name = "FrmLogin"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public PasswordKey As String
Public NameKey As String
Public Try_times As Integer
Private Sub Cmd_Cancel_Click()
End
End Sub
Private Sub Cmd_OK_Click()
Dim j As Single
'數據有效性檢查
If TxtUser = "" Then
MsgBox "請輸入用戶名"
TxtUser.SetFocus
Exit Sub
End If
If TxtPwd = "" Then
MsgBox "請輸入密碼"
TxtPwd.SetFocus
Exit Sub
End If
NameKey = MakeStr(TxtUser)
PasswordKey = MakeStr(TxtPwd)
'判斷用戶是否存在
If MyUser.In_DB(NameKey) = False Then
MsgBox "用戶名不存在"
Try_times = Try_times + 1
If Try_times >= 3 Then
MsgBox "您已經三次嘗試進入本系統,均不成功,系統將關閉"
DBapi_Disconnect
End
Else
Exit Sub
End If
End If
'判斷密碼是否正確
MyUser.GetInfo (NameKey)
If MyUser.UserPwd <> PasswordKey Then
MsgBox "密碼錯誤"
Try_times = Try_times + 1
If Try_times >= 3 Then
MsgBox "您已經三次嘗試進入本系統,均不成功,系統將關閉"
DBapi_Disconnect
End
Else
Exit Sub
End If
End If
'登錄成功,將當前用戶的信息保存在CurUser中
CurUser.GetInfo (NameKey)
'關閉自己
Unload Me
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -