📄 form1.frm
字号:
VERSION 5.00
Begin VB.Form Form1
BackColor = &H80000000&
Caption = "管理入口"
ClientHeight = 2295
ClientLeft = 60
ClientTop = 345
ClientWidth = 4245
Icon = "Form1.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
MouseIcon = "Form1.frx":0ECA
ScaleHeight = 2295
ScaleWidth = 4245
StartUpPosition = 2 '屏幕中心
Begin VB.Frame Framel
Caption = "欧芬爱尔管理登录"
ForeColor = &H000000FF&
Height = 1935
Left = 120
TabIndex = 0
Top = 240
Width = 3975
Begin VB.CommandButton Command2
Caption = "取消"
Height = 375
Left = 2160
TabIndex = 6
Top = 1440
Width = 855
End
Begin VB.CommandButton Command1
Caption = "确定"
Height = 375
Left = 1200
TabIndex = 5
Top = 1440
Width = 735
End
Begin VB.TextBox Text2
Height = 270
IMEMode = 3 'DISABLE
Left = 1200
PasswordChar = "*"
TabIndex = 4
Top = 960
Width = 2295
End
Begin VB.TextBox Text1
Height = 270
Left = 1200
TabIndex = 2
Top = 480
Width = 2295
End
Begin VB.Label Label2
Caption = "密 码:"
Height = 255
Left = 480
TabIndex = 3
Top = 960
Width = 735
End
Begin VB.Label Label1
Caption = "管理员:"
Height = 375
Left = 480
TabIndex = 1
Top = 480
Width = 735
End
End
Begin VB.Data Data1
Caption = "Data1"
Connect = "Access"
DatabaseName = ""
DefaultCursorType= 0 '缺省游标
DefaultType = 2 '使用 ODBC
Enabled = 0 'False
Exclusive = 0 'False
Height = 375
Left = 2760
Options = 0
ReadOnly = 0 'False
RecordsetType = 1 'Dynaset
RecordSource = ""
Top = 120
Visible = 0 'False
Width = 1815
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub Command1_Click()
If Text1.Text = Data1.Recordset.Fields("username") And Text2.Text = Data1.Recordset.Fields("password") Then
Unload Me
MainFrm.Show
Else
MsgBox "用户或密码错误!", 0 + 16, "警告"
End If
End Sub
Private Sub Command2_Click()
End
End Sub
Private Sub Form_Activate()
Data1.DatabaseName = App.Path + "\odb.dll"
Data1.RecordSource = "users"
Data1.Refresh
End Sub
Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
KeyAscii = 0
Command1.Value = 1
End If
End Sub
Private Sub Text2_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
KeyAscii = 0
Command1.Value = 1
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -