📄 form2.frm
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Object = "{CDE57A40-8B86-11D0-B3C6-00A0C90AEA82}#1.0#0"; "MSDATGRD.OCX"
Begin VB.Form Form2
Caption = "Form2"
ClientHeight = 4260
ClientLeft = 60
ClientTop = 450
ClientWidth = 5925
LinkTopic = "Form2"
ScaleHeight = 4260
ScaleWidth = 5925
StartUpPosition = 3 '窗口缺省
Begin VB.CommandButton Command1
Caption = "查询"
Height = 495
Left = 2400
TabIndex = 7
Top = 3720
Width = 1575
End
Begin VB.CommandButton Command2
Caption = "下一步"
Height = 375
Left = 4320
TabIndex = 4
Top = 3840
Width = 1575
End
Begin VB.Frame Frame1
Caption = "火车信息"
Height = 3615
Left = 120
TabIndex = 0
Top = 0
Width = 5535
Begin VB.TextBox Text7
DataField = "卧铺价"
DataSource = "Adodc1"
Height = 375
Left = 3000
TabIndex = 17
Top = 3120
Width = 975
End
Begin VB.TextBox Text6
DataField = "硬座价"
DataSource = "Adodc1"
Height = 375
Left = 840
TabIndex = 15
Top = 3120
Width = 855
End
Begin VB.TextBox Text5
DataField = "卧铺票数"
DataSource = "Adodc1"
Height = 375
Left = 840
TabIndex = 13
Top = 2520
Width = 855
End
Begin VB.TextBox Text4
DataField = "硬座票数"
DataSource = "Adodc1"
Height = 375
Left = 840
TabIndex = 11
Top = 2040
Width = 855
End
Begin VB.TextBox Text3
Height = 375
Left = 840
TabIndex = 6
Top = 1560
Width = 975
End
Begin VB.TextBox Text2
Height = 375
Left = 840
TabIndex = 5
Top = 1080
Width = 975
End
Begin VB.TextBox Text1
Height = 375
Left = 120
TabIndex = 3
Top = 720
Width = 1575
End
Begin MSDataGridLib.DataGrid DataGrid1
Bindings = "Form2.frx":0000
Height = 2895
Left = 1920
TabIndex = 1
Top = 120
Width = 3495
_ExtentX = 6165
_ExtentY = 5106
_Version = 393216
HeadLines = 1
RowHeight = 15
BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ColumnCount = 2
BeginProperty Column00
DataField = ""
Caption = ""
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column01
DataField = ""
Caption = ""
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
SplitCount = 1
BeginProperty Split0
BeginProperty Column00
EndProperty
BeginProperty Column01
EndProperty
EndProperty
End
Begin VB.Label Label7
Caption = "卧铺价"
Height = 375
Left = 2040
TabIndex = 16
Top = 3120
Width = 735
End
Begin VB.Label Label6
Caption = "硬座价"
Height = 375
Left = 120
TabIndex = 14
Top = 3120
Width = 615
End
Begin VB.Label Label5
Caption = "卧铺"
Height = 255
Left = 120
TabIndex = 12
Top = 2520
Width = 735
End
Begin VB.Label Label4
Caption = "硬座"
Height = 375
Left = 120
TabIndex = 10
Top = 2040
Width = 855
End
Begin VB.Label Label3
Caption = "日期"
Height = 615
Left = 120
TabIndex = 9
Top = 1560
Width = 735
End
Begin VB.Label Label2
Caption = "起始站"
Height = 495
Left = 120
TabIndex = 8
Top = 1200
Width = 615
End
Begin VB.Label Label1
Caption = "请输入车次:"
Height = 375
Left = 120
TabIndex = 2
Top = 360
Width = 1455
End
End
Begin MSAdodcLib.Adodc Adodc1
Height = 375
Left = 120
Top = 3720
Visible = 0 'False
Width = 1935
_ExtentX = 3413
_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=Microsoft.Jet.OLEDB.4.0;Data Source=网上订票1.mdb;Persist Security Info=False"
OLEDBString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=网上订票1.mdb;Persist Security Info=False"
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
End
Attribute VB_Name = "Form2"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Adodc1.Recordset.MoveFirst
Do While Adodc1.Recordset.EOF <> True
If Adodc1.Recordset.Fields("车次").Value = Text1.Text Then
Text2.Text = Adodc1.Recordset.Fields("起始站").Value
Text3.Text = Adodc1.Recordset.Fields("日期").Value
Exit Do
End If
Adodc1.Recordset.MoveNext
Loop
If Adodc1.Recordset.EOF <> False Then
MsgBox ("今天没有列车")
End If
End Sub
Private Sub Command2_Click()
Form7.Show
Hide
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -