📄 frmlogin.frm
字号:
VERSION 5.00
Object = "{74848F95-A02A-4286-AF0C-A3C755E4A5B3}#1.0#0"; "actskn43.ocx"
Begin VB.Form frmLogin
Caption = "登陆"
ClientHeight = 2295
ClientLeft = 60
ClientTop = 450
ClientWidth = 4305
LinkTopic = "Form1"
ScaleHeight = 2295
ScaleWidth = 4305
StartUpPosition = 2 '屏幕中心
Begin VB.Frame Frame1
Height = 615
Left = 120
TabIndex = 5
Top = 1560
Width = 4095
Begin VB.CommandButton Command1
Caption = "网络配置"
Height = 375
Left = 240
TabIndex = 8
Top = 120
Width = 1215
End
Begin VB.CommandButton Cancel
Caption = "取消"
Height = 375
Left = 2880
TabIndex = 7
Top = 120
Width = 1095
End
Begin VB.CommandButton OK
Caption = "确定"
Height = 375
Left = 1680
TabIndex = 6
Top = 120
Width = 1095
End
End
Begin VB.Frame Frame2
Height = 1335
Left = 120
TabIndex = 0
Top = 120
Width = 4095
Begin VB.TextBox txtuserid
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 1440
TabIndex = 2
Top = 240
Width = 2175
End
Begin VB.TextBox txtpassword
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
IMEMode = 3 'DISABLE
Left = 1440
PasswordChar = "*"
TabIndex = 1
Top = 720
Width = 2175
End
Begin ACTIVESKINLibCtl.SkinLabel SkinLabel2
Height = 495
Left = 480
OleObjectBlob = "frmLogin.frx":0000
TabIndex = 3
Top = 720
Width = 975
End
Begin ACTIVESKINLibCtl.SkinLabel SkinLabel1
Height = 375
Left = 480
OleObjectBlob = "frmLogin.frx":0066
TabIndex = 4
Top = 240
Width = 975
End
Begin ACTIVESKINLibCtl.Skin sknlogin
Left = 0
OleObjectBlob = "frmLogin.frx":00CA
Top = 120
End
End
End
Attribute VB_Name = "frmLogin"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim icount As Integer
Dim number As Integer
Private Sub Command1_Click()
Load frmnetset
frmnetset.Show
End Sub
Private Sub Form_Load()
Call KnowConnection
strSkin = "Web-II.skn"
Call changeskin(Me, sknlogin, strSkin)
frmLogin.Visible = False
frmbegin.Show
End Sub
Private Sub OK_Click() '登陆名和密码是否与后台表匹配,如匹配,则登陆进去
username = "" '全局变量
If txtuserid.Text = "" Then
MsgBox "用户名不能为空!", vbOKOnly + vbExclamation, "警告"
Else
Dim rstlogin As ADODB.Recordset
On Error GoTo handle
txtsql = "select * from tbLogin where cName='" & txtuserid.Text & "'"
Set rstlogin = ExecuteSQL(txtsql)
If rstlogin.EOF = True Then
MsgBox "没有这个用户,请重新输入用户名!", vbOKOnly + vbExclamation, "警告"
txtuserid.Text = ""
txtpassword.Text = ""
txtuserid.SetFocus
rstlogin.Close
Else
If Trim(rstlogin("cPassword")) = Trim(txtpassword.Text) Then
Me.Hide
rstlogin.Close
username = Trim(txtuserid.Text)
mdiHotelmain.Show
Else
MsgBox "密码错误!"
txtpassword.Text = ""
End If
End If
icount = icount + 1
End If
If icount = 3 Then
MsgBox "请你重新登陆!"
Me.Hide
End If
cnnHotel.Close
Exit Sub
handle:
MsgBox "网络配置错误!请重新配置", vbInformation
txtuserid.Text = ""
txtpassword.Text = ""
End Sub
Private Sub Cancel_Click()
End
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -