📄 loginform.frm
字号:
VERSION 5.00
Begin VB.Form loginform
BorderStyle = 3 'Fixed Dialog
Caption = "用户登录"
ClientHeight = 1860
ClientLeft = 3360
ClientTop = 3240
ClientWidth = 4350
ControlBox = 0 'False
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 1860
ScaleWidth = 4350
ShowInTaskbar = 0 'False
StartUpPosition = 2 '屏幕中心
Begin VB.CommandButton Command5
Caption = "返回"
Height = 375
Left = 1560
TabIndex = 8
Top = 2160
Width = 975
End
Begin VB.CommandButton Command4
Caption = "用户管理"
Height = 375
Left = 240
TabIndex = 7
Top = 2160
Width = 1095
End
Begin VB.TextBox Text2
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
IMEMode = 3 'DISABLE
Left = 1440
MaxLength = 20
PasswordChar = "*"
TabIndex = 3
Top = 720
Width = 2055
End
Begin VB.TextBox Text1
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 1440
MaxLength = 20
TabIndex = 1
Top = 120
Width = 2055
End
Begin VB.CommandButton Command3
Caption = "高级(&A)"
Height = 375
Left = 2880
TabIndex = 6
Top = 1320
Width = 1095
End
Begin VB.CommandButton Command2
Caption = "取消(&C)"
Height = 375
Left = 1560
TabIndex = 5
Top = 1320
Width = 1095
End
Begin VB.CommandButton Command1
Caption = "登录(&L)"
Height = 375
Left = 240
TabIndex = 4
Top = 1320
Width = 1095
End
Begin VB.Label Label2
Caption = "密码:"
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 480
TabIndex = 2
Top = 720
Width = 735
End
Begin VB.Label Label1
Caption = "用户名:"
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 240
TabIndex = 0
Top = 120
Width = 1095
End
Begin VB.Line Line1
BorderStyle = 6 'Inside Solid
BorderWidth = 2
X1 = 0
X2 = 4320
Y1 = 1920
Y2 = 1920
End
End
Attribute VB_Name = "loginform"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'进入用户登录的过程
Private Sub Command1_Click()
Module1.UserLogin
End Sub
Private Sub Command2_Click()
Unload Me
MsgBox "登录失败"
Module2.CloseDatabase
End Sub
Private Sub Command3_Click()
loginform.Height = loginform.Height + 800
Command3.Enabled = False
End Sub
'进入用户检查的过程
Private Sub Command4_Click()
Module1.UserCheck
End Sub
Private Sub Command5_Click()
loginform.Height = loginform.Height - 800
Command3.Enabled = True
End Sub
Private Sub Form_Activate()
Me.Text1.SetFocus
End Sub
Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Text2.SetFocus
End If
End Sub
Private Sub Text2_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Command1_Click
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -