当前位置: 网学 > 编程文档 > VB > 正文

vb接收GPS数据源码全

来源:Http://myeducs.cn 联系QQ:点击这里给我发消息 作者: 用户投稿 来源: 网络 发布时间: 12/10/16
下载{$ArticleTitle}原创论文样式
nbsp;End
   Begin VB.Label Label1
      Caption         =   "Port"
      Height          =   195
      Left            =   1860
      TabIndex        =   1
      Top             =   120
      Width           =   435
   End
End
Attribute VB_Name = "frmRDDF_Record"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim line_num As Integer
Dim last_lat As Double
Dim last_lon As Double

Dim save_on As Boolean
Dim mark_cone As Boolean

Private Sub cmdMarkCone_Click()
   '''' marks the next waypoint as a cone
   mark_cone = True
End Sub

Private Sub Form_Load()
   txtPort.Text = MSComm1.CommPort
   txtSettings.Text = MSComm1.Settings
   dlgSaveTo.Filter = ".rddf|*.rddf"
   line_num = 0
   save_on = False
   mark_cone = False
End Sub


Private Sub cmdCommOn_Click()
   If MSComm1.PortOpen = True Then
      MSComm1.PortOpen = False
   End If
   MSComm1.CommPort = txtPort.Text
   MSComm1.Settings = txtSettings.Text
   MSComm1.Tag = ""
   txtSerialHistory.Text = ""
   MSComm1.PortOpen = True
End Sub

Private Sub txtCommOff_Click()
   MSComm1.PortOpen = False
End Sub


Private Sub cmdSave_Click()
   save_on = False
   dlgSaveTo.ShowSave
   If dlgSaveTo.CancelError = False And dlgSaveTo.FileName <> "" Then
      Open dlgSaveTo.FileName For Output As #1
      save_on = True
      txtRDDFHistory.Text = ""
   End If
End Sub



Private Sub MSComm1_OnComm()
   Dim val
   If MSComm1.CommEvent = comEvReceive Then
      val = MSComm1.Input
      If Asc(val) = 10 Or Asc(val) = 13 Then
         If MSComm1.Tag <> "" Then
            txtSerialHistory.Text = Mid(MSComm1.Tag & vbNewLine & txtSerialHistory.Text, 1, 1000)
      &nbs
  • 下一篇资讯: 在vb中实现鼠标手势
  • 网学推荐

    免费论文

    原创论文

    浏览:
    设为首页 | 加入收藏 | 论文首页 | 论文专题 | 设计下载 | 网学软件 | 论文模板 | 论文资源 | 程序设计 | 关于网学 | 站内搜索 | 网学留言 | 友情链接 | 资料中心
    版权所有 QQ:3710167 邮箱:3710167@qq.com 网学网 [Myeducs.cn] 您电脑的分辨率是 像素
    Copyright 2008-2015 myeducs.Cn www.myeducs.Cn All Rights Reserved
    湘ICP备09003080号