📄 form3.frm
字号:
VERSION 5.00
Begin VB.Form Form3
BorderStyle = 1 'Fixed Single
Caption = "长途车资料"
ClientHeight = 6825
ClientLeft = 45
ClientTop = 435
ClientWidth = 4635
LinkTopic = "Form3"
LockControls = -1 'True
MaxButton = 0 'False
MinButton = 0 'False
Picture = "Form3.frx":0000
ScaleHeight = 6825
ScaleWidth = 4635
StartUpPosition = 3 '窗口缺省
Begin VB.Label Label2
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "查看下条信息请关闭此窗口"
BeginProperty Font
Name = "楷体_GB2312"
Size = 14.25
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 285
Left = 360
TabIndex = 1
Top = 360
Width = 3780
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 5175
Left = 360
TabIndex = 0
Top = 1080
Width = 3735
End
End
Attribute VB_Name = "Form3"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim cnn As ADODB.Connection
Dim rs As ADODB.Recordset
Dim a(20), jiehe(10), b, asd
Dim e, f, c, d, tt, bijiao As Integer
Private Declare Function ShellExecute Lib "shell32.dll" Alias _
"ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, _
ByVal lpFile As String, ByVal lpParameters As String, _
ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
Private Const SW_SHOW = 5
Private Declare Function GetCursorPos Lib "user32" (lpPoint As POINTAPI) As Long
Private Type POINTAPI
X As Long
Y As Long
End Type
Dim strcnn, bijiao1, bijiao2 As String
Private Sub Form_Load()
Label2.Visible = False
asd = 0
Set cnn = New ADODB.Connection
strcnn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + App.Path + "\db1.mdb;Persist Security Info=False"
cnn.Open strcnn
Set rs = New ADODB.Recordset
rs.CursorType = adOpenKeyset
rs.LockType = adLockOptimistic
rs.Open "changtu", cnn, , , adCmdTable
zx = Form1.Text6.Text
jiehe(0) = "客运车资料:" + Chr(13) + Chr(10)
rs.MoveFirst
Do While Not rs.EOF
If rs.Fields("车号") = zx Then
a(0) = rs.Fields("车号")
a(1) = rs.Fields("始发站")
a(2) = rs.Fields("发车时间")
a(3) = rs.Fields("终点站")
a(4) = rs.Fields("到站时间")
a(5) = rs.Fields("车型")
a(6) = rs.Fields("票价")
a(7) = rs.Fields("联系电话")
jiehe(1) = " 车 号: " + a(0) + Chr(13) + Chr(10) + " 始 发 站: " + a(1) + Chr(13) + Chr(10) + " 发车时间: " + a(2) + Chr(13) + Chr(10) + " 终 点 站: " + a(3) + Chr(13) + Chr(10) + " 到站时间: " + a(4) + Chr(13) + Chr(10) + " 车 型: " + a(5) + Chr(13) + Chr(10) + " 票 价: " + a(6) + Chr(13) + Chr(10) + " 联系电话: " + a(7)
Label1.Caption = a(0) + Chr(13) + Chr(10) + jiehe(0) + Chr(13) + Chr(10) + jiehe(1)
b = a(0)
End If
rs.MoveNext
Loop
End Sub
Private Sub Label2_Click()
Form1.List3.Enabled = True
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -