📄 frm_log.frm
字号:
VERSION 5.00
Begin VB.Form Frm_log
BorderStyle = 0 'None
Caption = "Frm_log"
ClientHeight = 2115
ClientLeft = 4035
ClientTop = 3120
ClientWidth = 3240
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 2115
ScaleWidth = 3240
ShowInTaskbar = 0 'False
StartUpPosition = 1 '所有者中心
Begin VB.CommandButton Command2
Cancel = -1 'True
Caption = "取消"
Height = 315
Left = 1680
TabIndex = 2
Top = 1500
Width = 1035
End
Begin VB.CommandButton Command1
Caption = "确定"
Height = 315
Left = 420
TabIndex = 1
Top = 1500
Width = 975
End
Begin VB.TextBox Text1
Height = 315
IMEMode = 3 'DISABLE
Left = 1170
PasswordChar = "*"
TabIndex = 0
Top = 840
Width = 1695
End
Begin VB.ComboBox Combo1
Height = 300
Left = 1170
Style = 2 'Dropdown List
TabIndex = 3
Top = 360
Width = 1695
End
Begin VB.Label Label2
Caption = "密 码"
Height = 255
Left = 300
TabIndex = 5
Top = 900
Width = 615
End
Begin VB.Label Label1
Caption = "用户名"
Height = 255
Left = 300
TabIndex = 4
Top = 420
Width = 615
End
End
Attribute VB_Name = "Frm_log"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Dim cn As ADODB.Connection
Dim rst As New ADODB.Recordset
Set cn = GetCn
rst.Open "select mima from yonghu where yh='" & Combo1 & "'", cn
If rst(0) <> Text1 Then
MsgBox "密码错误!", vbExclamation, "提示"
Text1.SetFocus
Exit Sub
End If
Unload Me
MDI_Frm.Show
MDI_Frm.ZOrder 0
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
Private Sub Form_Load()
Dim cn As ADODB.Connection
Dim rst As New ADODB.Recordset
Set cn = GetCn
rst.Open "select yh from yonghu order by 1 ", cn, 0, 1
Do While Not rst.EOF
Combo1.AddItem rst(0)
rst.MoveNext
Loop
Combo1.ListIndex = 0
rst.Close
cn.Close
End Sub
Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then Call Command1_Click
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -