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

📄 form1.frm

📁 这是一个简单的软件开发包(SDK)
💻 FRM
字号:
VERSION 5.00
Begin VB.Form Form1 
   Caption         =   "GPSLIB VB Test App"
   ClientHeight    =   5745
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   6630
   LinkTopic       =   "Form1"
   ScaleHeight     =   5745
   ScaleWidth      =   6630
   StartUpPosition =   3  'Windows Default
   Begin VB.Frame Frame1 
      Caption         =   "Position"
      Height          =   4455
      Left            =   240
      TabIndex        =   7
      Top             =   1080
      Width           =   3735
      Begin VB.Label QualityLabel 
         BorderStyle     =   1  'Fixed Single
         Height          =   255
         Left            =   1560
         TabIndex        =   37
         Top             =   3840
         Width           =   1815
      End
      Begin VB.Label AltitudeLabel 
         BorderStyle     =   1  'Fixed Single
         Height          =   255
         Left            =   1560
         TabIndex        =   36
         Top             =   3600
         Width           =   1815
      End
      Begin VB.Label SatellitesLabel 
         BorderStyle     =   1  'Fixed Single
         Height          =   255
         Left            =   1560
         TabIndex        =   35
         Top             =   3360
         Width           =   1815
      End
      Begin VB.Label SecondLabel 
         BorderStyle     =   1  'Fixed Single
         Height          =   255
         Left            =   1560
         TabIndex        =   34
         Top             =   3120
         Width           =   1815
      End
      Begin VB.Label MinuteLabel 
         BorderStyle     =   1  'Fixed Single
         Height          =   255
         Left            =   1560
         TabIndex        =   33
         Top             =   2880
         Width           =   1815
      End
      Begin VB.Label HourLabel 
         BorderStyle     =   1  'Fixed Single
         Height          =   255
         Left            =   1560
         TabIndex        =   32
         Top             =   2640
         Width           =   1815
      End
      Begin VB.Label DayLabel 
         BorderStyle     =   1  'Fixed Single
         Height          =   255
         Left            =   1560
         TabIndex        =   31
         Top             =   2400
         Width           =   1815
      End
      Begin VB.Label MonthLabel 
         BorderStyle     =   1  'Fixed Single
         Height          =   255
         Left            =   1560
         TabIndex        =   30
         Top             =   2160
         Width           =   1815
      End
      Begin VB.Label YearLabel 
         BorderStyle     =   1  'Fixed Single
         Height          =   255
         Left            =   1560
         TabIndex        =   29
         Top             =   1920
         Width           =   1815
      End
      Begin VB.Label SpeedLabel 
         BorderStyle     =   1  'Fixed Single
         Height          =   255
         Left            =   1560
         TabIndex        =   28
         Top             =   1680
         Width           =   1815
      End
      Begin VB.Label BearingLabel 
         BorderStyle     =   1  'Fixed Single
         Height          =   255
         Left            =   1560
         TabIndex        =   27
         Top             =   1440
         Width           =   1815
      End
      Begin VB.Label LongitudeLabel 
         BorderStyle     =   1  'Fixed Single
         Height          =   255
         Left            =   1560
         TabIndex        =   26
         Top             =   1200
         Width           =   1815
      End
      Begin VB.Label EastingLabel 
         BorderStyle     =   1  'Fixed Single
         Height          =   255
         Left            =   1560
         TabIndex        =   25
         Top             =   960
         Width           =   1815
      End
      Begin VB.Label LatitudeLabel 
         BorderStyle     =   1  'Fixed Single
         Height          =   255
         Left            =   1560
         TabIndex        =   24
         Top             =   720
         Width           =   1815
      End
      Begin VB.Label NorthingLabel 
         BorderStyle     =   1  'Fixed Single
         Height          =   255
         Left            =   1560
         TabIndex        =   23
         Top             =   480
         Width           =   1815
      End
      Begin VB.Label Label17 
         Caption         =   "Quality"
         Height          =   255
         Left            =   360
         TabIndex        =   22
         Top             =   3840
         Width           =   855
      End
      Begin VB.Label Label16 
         Caption         =   "Altitude"
         Height          =   255
         Left            =   360
         TabIndex        =   21
         Top             =   3600
         Width           =   855
      End
      Begin VB.Label Label15 
         Caption         =   "Satellites"
         Height          =   255
         Left            =   360
         TabIndex        =   20
         Top             =   3360
         Width           =   735
      End
      Begin VB.Label Label14 
         Caption         =   "Second"
         Height          =   255
         Left            =   360
         TabIndex        =   19
         Top             =   3120
         Width           =   615
      End
      Begin VB.Label Label13 
         Caption         =   "Minute"
         Height          =   255
         Left            =   360
         TabIndex        =   18
         Top             =   2880
         Width           =   615
      End
      Begin VB.Label Label12 
         Caption         =   "Hour"
         Height          =   255
         Left            =   360
         TabIndex        =   17
         Top             =   2640
         Width           =   495
      End
      Begin VB.Label Label11 
         Caption         =   "Day"
         Height          =   255
         Left            =   360
         TabIndex        =   16
         Top             =   2400
         Width           =   495
      End
      Begin VB.Label Label10 
         Caption         =   "Month"
         Height          =   255
         Left            =   360
         TabIndex        =   15
         Top             =   2160
         Width           =   615
      End
      Begin VB.Label Label9 
         Caption         =   "Year"
         Height          =   255
         Left            =   360
         TabIndex        =   14
         Top             =   1920
         Width           =   615
      End
      Begin VB.Label Label8 
         Caption         =   "Speed"
         Height          =   255
         Left            =   360
         TabIndex        =   13
         Top             =   1680
         Width           =   735
      End
      Begin VB.Label Label7 
         Caption         =   "Bearing"
         Height          =   255
         Left            =   360
         TabIndex        =   12
         Top             =   1440
         Width           =   735
      End
      Begin VB.Label Label6 
         Caption         =   "Longitude"
         Height          =   255
         Left            =   360
         TabIndex        =   11
         Top             =   1200
         Width           =   855
      End
      Begin VB.Label Label5 
         Caption         =   "Easting"
         Height          =   255
         Left            =   360
         TabIndex        =   10
         Top             =   960
         Width           =   735
      End
      Begin VB.Label Label4 
         Caption         =   "Latitude"
         Height          =   255
         Left            =   360
         TabIndex        =   9
         Top             =   720
         Width           =   855
      End
      Begin VB.Label Label3 
         Caption         =   "Nothing"
         Height          =   255
         Left            =   360
         TabIndex        =   8
         Top             =   480
         Width           =   735
      End
   End
   Begin VB.CommandButton GetPositionButton 
      Caption         =   "Get Position"
      Height          =   375
      Left            =   4320
      TabIndex        =   4
      Top             =   1680
      Width           =   2175
   End
   Begin VB.CommandButton CloseButton 
      Caption         =   "Close"
      Height          =   375
      Left            =   4320
      TabIndex        =   3
      Top             =   2160
      Width           =   2175
   End
   Begin VB.CommandButton OpenButton 
      Caption         =   "Open"
      Height          =   375
      Left            =   4320
      TabIndex        =   2
      Top             =   1200
      Width           =   2175
   End
   Begin VB.CommandButton ShowControlPanelButton 
      Caption         =   "Show Control Panel"
      Height          =   375
      Left            =   4320
      TabIndex        =   1
      Top             =   240
      Width           =   2175
   End
   Begin VB.CommandButton CreateEntryButton 
      Caption         =   "Create Entry"
      Height          =   375
      Left            =   4320
      TabIndex        =   0
      Top             =   720
      Width           =   2175
   End
   Begin VB.Label RValLabel 
      BorderStyle     =   1  'Fixed Single
      Height          =   375
      Left            =   2640
      TabIndex        =   6
      Top             =   240
      Width           =   1335
   End
   Begin VB.Label Label1 
      Caption         =   "Current Function Return Value:"
      Height          =   375
      Left            =   120
      TabIndex        =   5
      Top             =   240
      Width           =   2295
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim GPSHandle As Long
Dim GPSPosition As GPSPosition

Private Sub CloseButton_Click()
    Dim Retval As Long
    Retval = GpsClose(GPSHandle)
    CloseButton.Enabled = False
    OpenButton.Enabled = True
    GetPositionButton.Enabled = False
    RValLabel.Caption = Retval
End Sub
Private Sub CreateEntryButton_Click()
    Dim HWNDMain As Long
    Dim Retval As Long
    Retval = GpsCreateEntry(Form1.hWnd)
    RValLabel.Caption = Retval
End Sub
Private Sub Form_Load()
    GetPositionButton.Enabled = False
    CloseButton.Enabled = False
End Sub

Private Sub Form_Unload(Cancel As Integer)
    If (CloseButton.Enabled) Then
        GpsClose (GPSHandle)
    End If
End Sub

Private Sub GetPositionButton_Click()
    Dim Retval As Long
    Retval = GpsGetPosition(GPSHandle, GPSPosition)
    RValLabel.Caption = Retval
    NorthingLabel.Caption = GPSPosition.Northing
    LatitudeLabel.Caption = GPSPosition.Latitude
    EastingLabel.Caption = GPSPosition.Easting
    LongitudeLabel.Caption = GPSPosition.Longitude
    BearingLabel.Caption = GPSPosition.Bearing
    SpeedLabel.Caption = GPSPosition.Speed
    YearLabel.Caption = GPSPosition.FixYear
    MonthLabel.Caption = GPSPosition.FixMonth
    DayLabel.Caption = GPSPosition.FixDay
    HourLabel.Caption = GPSPosition.FixHour
    MinuteLabel.Caption = GPSPosition.FixMinute
    SecondLabel.Caption = GPSPosition.FixSecond
    SatellitesLabel.Caption = GPSPosition.Satellites
    AltitudeLabel.Caption = GPSPosition.AntennaAltitude
    QualityLabel.Caption = GPSPosition.QualityIndicator
    
End Sub
Private Sub OpenButton_Click()
    GPSHandle = GpsOpen("Device Name")
    OpenButton.Enabled = False
    CloseButton.Enabled = True
    GetPositionButton.Enabled = True
    RValLabel.Caption = GPSHandle
End Sub
Private Sub ShowControlPanelButton_Click()
    Dim HWNDMain As Long
    Dim Retval As Long
    Retval = GpsShowControlPanel()
    RValLabel.Caption = Retval
End Sub

⌨️ 快捷键说明

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