📄 frm_login.frm
字号:
VERSION 5.00
Begin VB.Form frm_login
BorderStyle = 1 'Fixed Single
Caption = "身份确认"
ClientHeight = 2955
ClientLeft = 4965
ClientTop = 5010
ClientWidth = 4920
Icon = "frm_login.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MDIChild = -1 'True
MinButton = 0 'False
ScaleHeight = 2955
ScaleWidth = 4920
Begin VB.CommandButton cmd_cancel
Cancel = -1 'True
Caption = "取消(&C)"
Height = 375
Left = 840
TabIndex = 3
Top = 1800
Width = 1095
End
Begin VB.CommandButton cmd_OK
Caption = "确定(&D)"
Default = -1 'True
Height = 375
Left = 2520
TabIndex = 2
Top = 1800
Width = 1095
End
Begin VB.TextBox Text1
Height = 375
IMEMode = 3 'DISABLE
Left = 1800
PasswordChar = "*"
TabIndex = 1
Top = 600
Width = 2055
End
Begin VB.Label Label1
Caption = "请输入密码:"
Height = 255
Left = 480
TabIndex = 0
Top = 720
Width = 1215
End
End
Attribute VB_Name = "frm_login"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim t As String
Private Sub cmd_cancel_Click()
End
End Sub
Private Sub cmd_OK_Click()
Set RS = DB.OpenRecordset("select PWD from PWD")
RS.MoveFirst
If VBA.Trim(Text1.Text) = VBA.Trim(RS.Fields("PWD").Value) Then
t = "ok"
Unload Me
Else
MsgBox "密码错误!", vbCritical, "通行证"
Text1.SetFocus
End If
End Sub
Private Sub Form_Load()
Me.Left = (Frm_main.Width - Me.Width) / 2
Me.Top = (Frm_main.Height - Me.Height) / 3
End Sub
Private Sub Form_Unload(Cancel As Integer)
If t <> "ok" Then
End
Else
Call Frm_main.menu(True)
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -