📄 frmlogin.frm
字号:
VERSION 5.00
Begin VB.Form frmLogin
BorderStyle = 3 'Fixed Dialog
Caption = "Login"
ClientHeight = 2910
ClientLeft = 30
ClientTop = 330
ClientWidth = 3900
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 2910
ScaleWidth = 3900
ShowInTaskbar = 0 'False
StartUpPosition = 2 '屏幕中心
Tag = "Login"
Begin VB.CommandButton cmdCancel
Cancel = -1 'True
Caption = "取 消"
Height = 360
Left = 2100
TabIndex = 4
Tag = "Cancel"
Top = 2304
Width = 1140
End
Begin VB.CommandButton cmdOK
Caption = "确 定"
Default = -1 'True
Height = 360
Left = 492
TabIndex = 3
Tag = "OK"
Top = 2280
Width = 1140
End
Begin VB.TextBox txtPassword
Height = 288
IMEMode = 3 'DISABLE
Left = 1548
PasswordChar = "*"
TabIndex = 2
Top = 1812
Width = 2064
End
Begin VB.TextBox txtUserName
Height = 288
Left = 1548
TabIndex = 1
Top = 1416
Width = 2064
End
Begin VB.Label Label1
Caption = "航空公司机票订购管理系统"
BeginProperty Font
Name = "华文彩云"
Size = 24
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H80000001&
Height = 972
Left = 480
TabIndex = 6
Top = 120
Width = 3132
End
Begin VB.Label lblLabels
Caption = "密 码:"
BeginProperty Font
Name = "Arial"
Size = 12
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 252
Index = 1
Left = 348
TabIndex = 0
Tag = "&Password:"
Top = 1824
Width = 1080
End
Begin VB.Label lblLabels
Caption = "用户名:"
BeginProperty Font
Name = "Arial"
Size = 12
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 252
Index = 0
Left = 348
TabIndex = 5
Tag = "&User Name:"
Top = 1440
Width = 1080
End
End
Attribute VB_Name = "frmLogin"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Public OK As Boolean
Dim micount As Integer
Private Sub Form_Load()
OK = False
micount = 0
End Sub
Private Sub cmdCancel_Click()
OK = False
End
End Sub
Private Sub cmdOK_Click()
Dim txtsql As String
Dim mrc As ADODB.Recordset
Dim msgtext As String
If Trim(txtUserName.Text = "") Then
MsgBox "没有这个用户,请重新输入用户名!", vbOKOnly + vbExclamation, "警告"
txtUserName.SetFocus
Else
txtsql = "select*from userinfo where userID='" & txtUserName.Text & "'"
Set mrc = ExecuteSQL(txtsql, msgtext)
If mrc.EOF = True Then
MsgBox "没有这个用户,请重新输入用户名!", vbOKOnly + vbExclamation, "警告"
txtUserName.SetFocus
txtUserName.Text = ""
txtPassword.Text = ""
Else
If Trim(mrc.Fields(1)) <> Trim(txtPassword.Text) Then
MsgBox "输入密码不正确,请重新输入!", vbOKOnly + vbExclamation, "警告"
txtPassword.SetFocus
txtPassword.Text = ""
Else
OK = True
mrc.Close
Me.Hide
If txtUserName.Text = "user" Then
frmMain.menuModifypwd = False
frmMain.menuAdduser = False
Else
txtUserName.Text = "admin"
txtUserName = Trim(txtUserName.Text)
End If
End If
End If
End If
micount = micount + 1
If micount = 3 Then
End
End If
Exit Sub
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -