📄 denglu.frm
字号:
VERSION 5.00
Begin VB.Form denglu
Appearance = 0 'Flat
AutoRedraw = -1 'True
BackColor = &H80000005&
BorderStyle = 1 'Fixed Single
Caption = "登陆"
ClientHeight = 4095
ClientLeft = 4620
ClientTop = 3045
ClientWidth = 5445
Icon = "denglu.frx":0000
LinkTopic = "Form1"
LockControls = -1 'True
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 4095
ScaleWidth = 5445
Begin VB.PictureBox Picture1
Appearance = 0 'Flat
BackColor = &H80000005&
ForeColor = &H80000008&
Height = 4215
Left = 0
Picture = "denglu.frx":1082
ScaleHeight = 4185
ScaleWidth = 5505
TabIndex = 4
Top = 0
Width = 5535
Begin VB.TextBox Text2
Appearance = 0 'Flat
BackColor = &H00FFFFFF&
Height = 375
IMEMode = 3 'DISABLE
Left = 2040
PasswordChar = "*"
TabIndex = 1
Top = 2280
Width = 2295
End
Begin VB.TextBox Text1
Appearance = 0 'Flat
BackColor = &H00FFFFFF&
Height = 375
Left = 2040
TabIndex = 0
Top = 1560
Width = 2295
End
Begin VB.Label cmdcal
BackStyle = 0 'Transparent
Height = 375
Left = 3000
MousePointer = 14 'Arrow and Question
TabIndex = 3
Top = 3240
Width = 1215
End
Begin VB.Label cmdOK
BackStyle = 0 'Transparent
Height = 375
Left = 1080
TabIndex = 2
Top = 3240
Width = 1215
End
End
End
Attribute VB_Name = "denglu"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public ok As Boolean
'记录确定次数
Dim miCount As Integer
Private Sub cmdOK_Click()
Dim txtSQL As String
Dim mrc As ADODB.Recordset
Dim MsgText As String
username = ""
If Trim(Me.Text1.Text = "") Then
MsgBox "没有这个用户,请重新输入用户名!", vbOKOnly + vbExclamation, "警告"
Me.Text1.SetFocus
Else
txtSQL = "select * from user_if where user_ID = '" & Me.Text1.Text & "'"
Set mrc = ExecuteSQL(txtSQL, MsgText)
If mrc.EOF = True Then
MsgBox "没有这个用户,请重新输入用户名!", vbOKOnly + vbExclamation, "警告"
Me.Text1.SetFocus
Else
If Trim(mrc.Fields(1)) = Trim(Me.Text2.Text) Then
ok = True
mrc.Close
Me.Hide
mainForm1.Show
username = Trim(Me.Text1.Text)
Else
MsgBox "输入密码不正确,请重新输入!", vbOKOnly + vbExclamation, "警告"
Me.Text2.SetFocus
Me.Text2.Text = ""
End If
End If
End If
miCount = miCount + 1
If miCount = 3 Then
Me.Hide
End If
Exit Sub
End Sub
Private Sub cmdcal_Click()
ok = False
Me.Hide
End Sub
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Me.cmdOK.TabIndex = 0
ok = True
End If
End Sub
Private Sub Form_Load()
ok = False
miCount = 0
End Sub
Private Sub Label2_Click()
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -