⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 xuanze.frm

📁 全球定位系统GPS_卫星定位_VB源码+使用说明
💻 FRM
字号:
VERSION 5.00
Begin VB.Form CbCf1 
   Caption         =   "重放轨迹"
   ClientHeight    =   4035
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   5055
   Icon            =   "xuanze.frx":0000
   LinkTopic       =   "Form1"
   ScaleHeight     =   4035
   ScaleWidth      =   5055
   StartUpPosition =   3  'Windows Default
   Begin VB.ComboBox Combo5 
      Height          =   300
      Left            =   3600
      TabIndex        =   18
      Top             =   2640
      Width           =   975
   End
   Begin VB.ComboBox Combo4 
      Height          =   300
      Left            =   3600
      TabIndex        =   17
      Top             =   1800
      Width           =   975
   End
   Begin VB.CheckBox Check1 
      Caption         =   "所有车辆"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   300
      Left            =   2160
      TabIndex        =   10
      Top             =   15
      Width           =   1335
   End
   Begin VB.ComboBox Combo3 
      Height          =   300
      Left            =   2160
      TabIndex        =   5
      Top             =   2640
      Width           =   975
   End
   Begin VB.ComboBox Combo2 
      Height          =   300
      Left            =   2160
      TabIndex        =   4
      Top             =   1800
      Width           =   975
   End
   Begin VB.ComboBox Combo1 
      Height          =   300
      Left            =   2160
      TabIndex        =   3
      Top             =   960
      Width           =   1335
   End
   Begin VB.CommandButton Command2 
      Caption         =   "取消"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   3960
      TabIndex        =   2
      Top             =   1080
      Width           =   975
   End
   Begin VB.CommandButton Command1 
      Caption         =   "确认"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   3960
      TabIndex        =   1
      Top             =   360
      Width           =   975
   End
   Begin VB.FileListBox File1 
      Height          =   2610
      Left            =   120
      Pattern         =   "*.tck"
      TabIndex        =   0
      Top             =   360
      Width           =   1815
   End
   Begin VB.Label Label12 
      Caption         =   "分"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   4680
      TabIndex        =   20
      Top             =   2640
      Width           =   255
   End
   Begin VB.Label Label11 
      Caption         =   "分"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   4680
      TabIndex        =   19
      Top             =   1800
      Width           =   255
   End
   Begin VB.Label Label10 
      Caption         =   "时"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   3240
      TabIndex        =   16
      Top             =   2640
      Width           =   255
   End
   Begin VB.Label Label9 
      Caption         =   "时"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   3240
      TabIndex        =   15
      Top             =   1800
      Width           =   255
   End
   Begin VB.Label Label8 
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   1680
      TabIndex        =   14
      Top             =   3600
      Width           =   2775
   End
   Begin VB.Label Label7 
      Caption         =   "起始时间:"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   120
      TabIndex        =   13
      Top             =   3600
      Width           =   1095
   End
   Begin VB.Label Label6 
      Caption         =   "文件大小:"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   120
      TabIndex        =   12
      Top             =   3120
      Width           =   1095
   End
   Begin VB.Label Label5 
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   1680
      TabIndex        =   11
      Top             =   3120
      Width           =   1455
   End
   Begin VB.Label Label4 
      Caption         =   "选择时间段:"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   2160
      TabIndex        =   9
      Top             =   1440
      Width           =   1455
   End
   Begin VB.Image Image1 
      Height          =   480
      Left            =   4560
      Picture         =   "xuanze.frx":08CA
      Top             =   3480
      Width           =   480
   End
   Begin VB.Label Label3 
      Caption         =   "选择车号:"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   2160
      TabIndex        =   8
      Top             =   600
      Width           =   1215
   End
   Begin VB.Label Label2 
      Caption         =   "选择文件:"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   120
      TabIndex        =   7
      Top             =   0
      Width           =   1095
   End
   Begin VB.Label Label1 
      Caption         =   "到"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   2640
      TabIndex        =   6
      Top             =   2280
      Width           =   255
   End
End
Attribute VB_Name = "CbCf1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Type Record
    nID As Integer
    dTime As Date
    fLongitude As Double
    fLatitude As Double
    bAlert As Boolean
    fSpeed As Double
    fDirection As Double
End Type
Private FileSize As Long
Private m_uRecord As Record
Private ccc As String
Private Sub Check1_Click()
If Check1.Value = 1 Then
   Combo1.Enabled = False
   Cfflag = True
Else
   Combo1.Enabled = True
   Cfflag = False
End If
End Sub

Private Sub Command1_Click()
Dim Max_time As String
Dim i As Integer
Dim Temp_time As String
Dim Temp_y As Integer
CfWj = File1.Path + "\" + File1.Filename
CfCh = Combo1.Text
CfTime = Combo2.Text + Combo4.Text
CfTotime = Combo3.Text + Combo5.Text
For i = 1 To Len(ccc)
     Temp_time = Mid(ccc, i, 1)
    If Temp_time <> ":" Then
           Max_time = Max_time + Temp_time
    Else
          Temp_y = Temp_y + 1
          If Temp_y = 2 Then
             Exit For
          End If
    End If
Next
If Val(CfTime) > Val(Max_time) Then
   MsgBox "时间超出范围", vbCritical, App.title
   Exit Sub
End If
If Val(CfTime) > Val(CfTotime) Then
   MsgBox "选择时间有错", vbInformation, App.title
Else
Cfone = True
Unload Me
MDIMainForm.oWorkMode.ReplayInit
End If
End Sub

Private Sub Command2_Click()
Unload Me
End Sub

Private Sub File1_Click()
Dim Filename As String
Dim filenum As Integer
Dim j As Long
Dim MaxRecord As Long
Dim ddd As String
Filename = File1.Path + "\" + File1.Filename
filenum = FreeFile
FileSize = FileLen(File1.Path + "\" + File1.Filename)
Label5.Caption = FileSize & "字节"
Open Filename For Random Access Read As #filenum Len = Len(m_uRecord)
On Error Resume Next
'Do While Not EOF(Filenum)
   'Get #Filenum, , m_uRecord
   'If j = 0 Then
   '   ddd = Mid(str(m_uRecord.dTime), Len(str(m_uRecord.dTime)) - 7, 8)
   'End If
   'j = j + 1
   'DoEvents
   'If Trim(str(m_uRecord.dTime)) <> "00:00:00" Then
   ' ccc = Mid(str(m_uRecord.dTime), Len(str(m_uRecord.dTime)) - 7, 8)
   'End If
'j = Seek(Filenum)
'Loop
Get #filenum, , m_uRecord
ddd = Mid(str(m_uRecord.dTime), Len(str(m_uRecord.dTime)) - 7, 8)
If LOF(filenum) Mod Len(m_uRecord) <> 0 Then
   Close #filenum
End If
MaxRecord = LOF(filenum) \ Len(m_uRecord)
If MaxRecord <> 0 Then
    Seek #filenum, MaxRecord
    Get #filenum, , m_uRecord
    ccc = Mid(str(m_uRecord.dTime), Len(str(m_uRecord.dTime)) - 7, 8)
    Label8.Caption = Trim(ddd) + "到" + Trim(ccc)
Else
    Label8.Caption = "无记录"
End If
End Sub

Private Sub Form_Load()
Dim dbs As Database
Dim rst As Recordset
Dim i As Integer
On Error Resume Next
Set dbs = DBEngine.Workspaces(0).OpenDatabase(strPath + PATH_DBDATA)
Set rst = dbs.OpenRecordset("target")
Do While Not rst.EOF
   Combo1.AddItem rst.Fields("name")
   rst.MoveNext
Loop

File1.Path = strPath + "tck\" '"c:\gps\"

Combo1.Text = 1
For i = 0 To 23
    Combo2.AddItem i
    Combo3.AddItem i
Next
Combo2.Text = 1
Combo3.Text = 23
For i = 0 To 59
    If Len(Trim(str(i))) = 1 Then
       Combo4.AddItem "0" + Trim(str(i))
       Combo5.AddItem "0" + Trim(str(i))
    Else
       Combo4.AddItem i
       Combo5.AddItem i
    End If
Next
Combo4.Text = "00"
Combo5.Text = "59"
Qren = False
End Sub

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -