📄 登录界面.frm
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Begin VB.Form Form1
Caption = "Form1"
ClientHeight = 4830
ClientLeft = 60
ClientTop = 390
ClientWidth = 7140
LinkTopic = "Form1"
ScaleHeight = 4830
ScaleWidth = 7140
StartUpPosition = 2 '屏幕中心
Begin VB.TextBox Text3
Height = 375
Left = 120
TabIndex = 10
Top = 3240
Visible = 0 'False
Width = 855
End
Begin MSAdodcLib.Adodc Adodc2
Height = 375
Left = 2040
Top = 4320
Visible = 0 'False
Width = 1575
_ExtentX = 2778
_ExtentY = 661
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 3
LockType = 3
CommandType = 2
CursorOptions = 0
CacheSize = 50
MaxRecords = 0
BOFAction = 0
EOFAction = 0
ConnectStringType= 1
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=车站售票管理系统"
OLEDBString = "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=车站售票管理系统"
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = "售票员口令表"
Caption = "Adodc2"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
_Version = 393216
End
Begin MSAdodcLib.Adodc Adodc1
Height = 375
Left = 240
Top = 4320
Visible = 0 'False
Width = 1695
_ExtentX = 2990
_ExtentY = 661
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 3
LockType = 3
CommandType = 2
CursorOptions = 0
CacheSize = 50
MaxRecords = 0
BOFAction = 0
EOFAction = 0
ConnectStringType= 1
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=车站售票管理系统"
OLEDBString = "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=车站售票管理系统"
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = "管理员口令表"
Caption = "Adodc1"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
_Version = 393216
End
Begin VB.CommandButton Cmdexit
Caption = "退出"
Height = 495
Left = 5040
TabIndex = 9
Top = 3600
Width = 1215
End
Begin VB.CommandButton CmdOK
Caption = "确定"
Default = -1 'True
Height = 495
Left = 5040
TabIndex = 8
Top = 2760
Width = 1215
End
Begin VB.TextBox Text2
Height = 495
IMEMode = 3 'DISABLE
Left = 2640
PasswordChar = "*"
TabIndex = 7
Top = 3600
Width = 1455
End
Begin VB.TextBox Text1
Height = 495
Left = 2640
TabIndex = 6
Top = 2760
Width = 1455
End
Begin VB.Frame Frame1
Caption = "用户"
BeginProperty Font
Name = "宋体"
Size = 15.75
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 975
Left = 1080
TabIndex = 1
Top = 1560
Width = 4455
Begin VB.OptionButton Option2
Caption = "售票员"
BeginProperty Font
Name = "宋体"
Size = 15
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 540
Left = 2640
TabIndex = 3
Top = 360
Value = -1 'True
Width = 1695
End
Begin VB.OptionButton Option1
Caption = "管理员"
BeginProperty Font
Name = "宋体"
Size = 15
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 840
TabIndex = 2
Top = 480
Width = 1575
End
End
Begin VB.Label Label3
Caption = "密码:"
BeginProperty Font
Name = "宋体"
Size = 15
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 1320
TabIndex = 5
Top = 3600
Width = 1335
End
Begin VB.Label Label2
Caption = "用户名:"
BeginProperty Font
Name = "宋体"
Size = 15
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 1320
TabIndex = 4
Top = 2760
Width = 1215
End
Begin VB.Label Label1
Caption = "车站售票管理系统"
BeginProperty Font
Name = "宋体"
Size = 36
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 975
Left = 600
TabIndex = 0
Top = 240
Width = 5895
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Cmdexit_Click()
End
End Sub
Private Sub Cmdok_Click()
Dim username1 As String, username2 As String
username1 = Text1.Text
If Option1.Value Then
Set Text3.DataSource = Adodc1
Text3.DataField = "口令"
Adodc1.Recordset.MoveFirst
If username1 <> "" Then
username2 = "用户名='" & username1 & "'"
Adodc1.Recordset.Find username2
If Adodc1.Recordset.EOF Then
MsgBox "用户名错误请重输", 16, "错误"
Else
If Text2.Text <> Text3.Text Then
MsgBox "密码错误请重输", 16, "错误"
Text2.Text = ""
Else
MDIForm1.Show
Form1.Hide
End If
End If
End If
Else
If Option2.Value Then
Set Text3.DataSource = Adodc2
Text3.DataField = "口令"
Adodc2.Recordset.MoveFirst
If username1 <> "" Then
username2 = "工号='" & username1 & "'"
Adodc2.Recordset.Find username2
If Adodc2.Recordset.EOF Then
MsgBox "用户名错误请重输", 16, "错误"
Else
If Text2.Text <> Text3.Text Then
MsgBox "密码错误请重输", 16, "错误"
Text2.Text = ""
Else
MDIForm1.Show
Form1.Hide
End If
End If
End If
End If
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -