📄 复件 frmgpstrack.frm
字号:
VERSION 5.00
Object = "{648A5603-2C6E-101B-82B6-000000000014}#1.1#0"; "mscomm32.ocx"
Begin VB.Form frmGpsTrack
Caption = "GPS跟踪设置"
ClientHeight = 6450
ClientLeft = 60
ClientTop = 450
ClientWidth = 9810
Icon = "frmGpsTrack.frx":0000
LinkTopic = "Form1"
LockControls = -1 'True
MaxButton = 0 'False
ScaleHeight = 6450
ScaleWidth = 9810
StartUpPosition = 2 '屏幕中心
Begin VB.CheckBox Check1
Caption = "生成GPS监测数据文件"
Height = 315
Left = 360
TabIndex = 29
Top = 6000
Value = 1 'Checked
Width = 2295
End
Begin VB.ComboBox Combo3
Height = 300
Left = 1050
Style = 2 'Dropdown List
TabIndex = 28
Top = 60
Width = 1575
End
Begin MSCommLib.MSComm MSComm1
Left = 3990
Top = -120
_ExtentX = 1005
_ExtentY = 1005
_Version = 393216
DTREnable = -1 'True
End
Begin VB.CommandButton Command4
Caption = "清空内容"
Height = 375
Left = 7020
TabIndex = 26
Top = 5970
Width = 1215
End
Begin VB.Frame Frame2
Caption = "当前接收数据"
Height = 705
Left = 30
TabIndex = 5
Top = 5160
Width = 9735
Begin VB.TextBox Text3
Alignment = 2 'Center
BackColor = &H00C0FFC0&
Height = 315
Index = 3
Left = 8700
Locked = -1 'True
TabIndex = 25
Top = 240
Width = 645
End
Begin VB.TextBox Text3
Alignment = 2 'Center
BackColor = &H00C0FFC0&
Height = 315
Index = 2
Left = 5790
Locked = -1 'True
TabIndex = 24
Top = 240
Width = 2325
End
Begin VB.TextBox Text3
Alignment = 2 'Center
BackColor = &H00C0FFC0&
Height = 315
Index = 1
Left = 3210
Locked = -1 'True
TabIndex = 23
Top = 240
Width = 2025
End
Begin VB.TextBox Text3
Alignment = 2 'Center
BackColor = &H00C0FFC0&
Height = 315
Index = 0
Left = 600
Locked = -1 'True
TabIndex = 22
Top = 240
Width = 2025
End
Begin VB.Label Label11
AutoSize = -1 'True
Caption = "星数:"
Height = 180
Left = 8220
TabIndex = 21
Top = 300
Width = 450
End
Begin VB.Label Label10
AutoSize = -1 'True
Caption = "时间:"
Height = 180
Left = 5340
TabIndex = 20
Top = 300
Width = 450
End
Begin VB.Label Label9
AutoSize = -1 'True
Caption = "纬度:"
Height = 180
Left = 2745
TabIndex = 19
Top = 300
Width = 450
End
Begin VB.Label Label8
AutoSize = -1 'True
Caption = "经度:"
Height = 180
Left = 105
TabIndex = 18
Top = 300
Width = 450
End
End
Begin VB.CommandButton Command3
Caption = "退出(&E)"
Height = 375
Left = 8280
TabIndex = 4
Top = 5970
Width = 1215
End
Begin VB.CommandButton Command2
Caption = "暂停(&T)"
Height = 375
Left = 5760
TabIndex = 3
Top = 5970
Width = 1215
End
Begin VB.CommandButton Command1
Caption = "开始跟踪(&S)"
Height = 375
Left = 4530
TabIndex = 2
Top = 5970
Width = 1215
End
Begin VB.TextBox Text1
BackColor = &H00C0E0FF&
Height = 3825
Left = 30
Locked = -1 'True
MultiLine = -1 'True
ScrollBars = 3 'Both
TabIndex = 1
Top = 1230
Width = 9735
End
Begin VB.Frame Frame1
Height = 795
Left = 30
TabIndex = 0
Top = 360
Width = 9735
Begin VB.TextBox Text2
Alignment = 2 'Center
BackColor = &H8000000F&
Height = 315
Index = 3
Left = 9000
Locked = -1 'True
TabIndex = 17
Text = "无"
Top = 300
Width = 615
End
Begin VB.TextBox Text2
Alignment = 2 'Center
BackColor = &H8000000F&
Height = 315
Index = 2
Left = 7350
Locked = -1 'True
TabIndex = 16
Text = "1"
Top = 300
Width = 585
End
Begin VB.TextBox Text2
Alignment = 2 'Center
BackColor = &H8000000F&
Height = 315
Index = 1
Left = 5970
Locked = -1 'True
TabIndex = 15
Text = "无"
Top = 300
Width = 585
End
Begin VB.ComboBox Combo2
Height = 300
Left = 2550
Style = 2 'Dropdown List
TabIndex = 14
Top = 300
Width = 1185
End
Begin VB.TextBox Text2
Alignment = 2 'Center
BackColor = &H8000000F&
Height = 315
Index = 0
Left = 4440
Locked = -1 'True
TabIndex = 13
Text = "8"
Top = 300
Width = 585
End
Begin VB.ComboBox Combo1
Height = 300
Left = 960
Style = 2 'Dropdown List
TabIndex = 12
Top = 300
Width = 735
End
Begin VB.Label Label6
AutoSize = -1 'True
Caption = "数据流控制:"
Height = 180
Left = 8010
TabIndex = 11
Top = 360
Width = 990
End
Begin VB.Label Label5
Caption = "停止位:"
Height = 255
Left = 6660
TabIndex = 10
Top = 360
Width = 885
End
Begin VB.Label Label4
Caption = "奇偶校验:"
Height = 255
Left = 5115
TabIndex = 9
Top = 360
Width = 885
End
Begin VB.Label Label3
Caption = "数据位:"
Height = 255
Left = 3765
TabIndex = 8
Top = 360
Width = 885
End
Begin VB.Label Label2
Caption = "每秒位数:"
Height = 255
Left = 1740
TabIndex = 7
Top = 360
Width = 885
End
Begin VB.Label Label1
Caption = "连接串口:"
Height = 255
Left = 120
TabIndex = 6
Top = 360
Width = 885
End
End
Begin VB.Label Label7
AutoSize = -1 'True
Caption = "GPS终端号:"
Height = 180
Left = 120
TabIndex = 27
Top = 120
Width = 900
End
End
Attribute VB_Name = "frmGpsTrack"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim rs As New ADODB.Recordset
Dim sGpsID As String
Dim bCreateGpsDataFile As Boolean
Private Sub Command1_Click()
'开始跟踪
Dim lpDeviceID As String
Dim lpComPort As Integer, lpBTS As Long, lpInputLen As Integer
Dim sSetting As String
On Error GoTo Err_NoPort
lpDeviceID = Me.Combo3.Text
lpComPort = Me.Combo1.Text
lpBTS = Me.Combo2.Text
If lpDeviceID = "" Then Exit Sub
'//BBBB 为波特率,P 为奇偶校验,D 为数据位数,S 为停止位数。
sSetting = lpBTS & ",N,8,1"
lpInputLen = 1
With Me
If .MSComm1.PortOpen = True Then .MSComm1.PortOpen = False
.MSComm1.CommPort = lpComPort
.MSComm1.Settings = sSetting
.MSComm1.Handshaking = comNone
.MSComm1.PortOpen = True
'.MSComm1.InputLen = lpInputLen
End With
Me.Command1.Enabled = False
Me.Command2.Enabled = True
Set_ProfileStringINI "Gps", "Com", lpComPort, App.Path + "\ProCFG.Ini"
Set_ProfileStringINI "Gps", "BTL", lpBTS, App.Path + "\ProCFG.Ini"
'------------------------------------------------------------
'打开临时图层进行轨迹回放操作
'判断是否已经打开临时表
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -