📄 frmlogin.frm
字号:
VERSION 5.00
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "Comdlg32.ocx"
Begin VB.Form FrmLogin
BorderStyle = 1 'Fixed Single
Caption = "登录"
ClientHeight = 1980
ClientLeft = 45
ClientTop = 330
ClientWidth = 3765
Icon = "FrmLogin.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 1980
ScaleWidth = 3765
StartUpPosition = 2 '屏幕中心
Begin MSComDlg.CommonDialog CommonDialog1
Left = 3840
Top = 1440
_ExtentX = 847
_ExtentY = 847
_Version = 393216
End
Begin VB.CommandButton CmdCancel
Caption = "取消"
Height = 375
Left = 2040
TabIndex = 5
Top = 1440
Width = 975
End
Begin VB.CommandButton CmdOK
Caption = "确定"
Height = 375
Left = 600
TabIndex = 4
Top = 1440
Width = 975
End
Begin VB.TextBox TextPassword
Height = 375
IMEMode = 3 'DISABLE
Left = 1200
PasswordChar = "*"
TabIndex = 3
Top = 840
Width = 2175
End
Begin VB.TextBox TextUser
Height = 375
Left = 1200
TabIndex = 1
Top = 240
Width = 2175
End
Begin VB.Label Label2
Caption = "密码"
Height = 375
Left = 360
TabIndex = 2
Top = 840
Width = 735
End
Begin VB.Label Label1
Caption = "用户名"
Height = 375
Left = 360
TabIndex = 0
Top = 360
Width = 735
End
End
Attribute VB_Name = "FrmLogin"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub CmdCancel_Click()
Unload Me
End Sub
Private Sub cmdOK_Click()
If Me.User = "admin" And Me.Password = "111" Then
Call Login
Load FrmCourse
FrmCourse.Show
FrmCourse.Visible = True
Unload Me
'FlagOpen = True
Else
MsgBox "用户名或密码输入不正确!"
'FlagOpen = False
End If
End Sub
Public Property Get User() As String
User = Me.TextUser.Text
End Property
Public Property Let User(ByVal vNewValue As String)
Me.TextUser.Text = vNewValue
End Property
Public Property Get Password() As Variant
Password = Me.TextPassword.Text
End Property
Public Property Let Password(ByVal vNewValue As Variant)
Me.TextPassword.Text = vNewValue
End Property
Public Sub Login()
MsgBox "登录成功!请指定数据库文件。"
Me.Hide
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -