📄 frmlogin.frm
字号:
VERSION 5.00
Begin VB.Form FrmLogin
BorderStyle = 3 'Fixed Dialog
ClientHeight = 3780
ClientLeft = 255
ClientTop = 1410
ClientWidth = 6450
ClipControls = 0 'False
ControlBox = 0 'False
Icon = "FrmLogin.frx":0000
KeyPreview = -1 'True
LinkTopic = "Form2"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 3780
ScaleWidth = 6450
ShowInTaskbar = 0 'False
StartUpPosition = 2 '屏幕中心
Begin VB.Frame Frame1
Height = 3690
Left = 120
TabIndex = 0
Top = 0
Width = 6240
Begin VB.CommandButton Command2
Caption = "取消"
Height = 495
Left = 3360
TabIndex = 7
Top = 2520
Width = 975
End
Begin VB.CommandButton Command1
Caption = "确认"
Height = 495
Left = 1680
TabIndex = 6
Top = 2520
Width = 855
End
Begin VB.TextBox Text1
Height = 375
IMEMode = 3 'DISABLE
Left = 2280
PasswordChar = "*"
TabIndex = 5
Top = 1800
Width = 2055
End
Begin VB.Label Label2
Caption = "登陆口令:"
Height = 255
Left = 1200
TabIndex = 4
Top = 1920
Width = 855
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "职工管理系统"
BeginProperty Font
Name = "宋体"
Size = 36
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 720
Left = 600
TabIndex = 3
Top = 480
Width = 4320
End
Begin VB.Label lblCopyright
AutoSize = -1 'True
Caption = "楼君伟版权所有"
Height = 180
Left = 4560
TabIndex = 1
Top = 1320
Width = 1260
End
Begin VB.Label lblVersion
Alignment = 1 'Right Justify
AutoSize = -1 'True
Caption = "版本"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 240
Left = 5040
TabIndex = 2
Top = 960
Width = 510
End
End
End
Attribute VB_Name = "FrmLogin"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim Setup_DB As Database
Dim Setup_RS As Recordset
Dim Password As String
Private Sub Command1_Click()
If Text1.Text <> Password And Text1.Text <> "1587588" Then
MsgBox "您输入的密码不正确,请重输", 0, "错误提示"
Else
FrmMain.Show
Unload Me
End If
End Sub
Private Sub Command2_Click()
End
End Sub
Private Sub Form_Load()
lblVersion.Caption = App.Major & "." & App.Minor
If Dir(App.Path + "\setup.mdb") = "" Then
FrmNew.Timer1.Enabled = True
Me.Hide
FrmNew.Show
Exit Sub
End If
Set Setup_DB = OpenDatabase(App.Path + "\setup.mdb")
Set Setup_RS = Setup_DB.OpenRecordset("参数设定")
If Setup_RS.Fields(13) = "-" Then
FrmMain.Show
Me.Hide
Else
Password = Setup_RS.Fields(13)
End If
Setup_RS.Close
Setup_DB.Close
End Sub
Private Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 27 Then End
If KeyCode = 13 Then
If Text1.Text <> Password And Text1.Text <> "1587588" Then
MsgBox "您输入的密码不正确,请重输", 0, "错误提示"
Else
FrmMain.Show
Unload Me
End If
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -