24h購物| | PChome| 登入
2011-06-14 09:30:40| 人氣397| 回應0 | 上一篇 | 下一篇

完成遠端監控程式(含GPS座標)初級版。(開方部分程式)

推薦 0 收藏 0 轉貼0 訂閱站台

前些日子買了GPS,用VB 寫了下面這個小程式(要給客戶Demo 用)



E-vista



Private Sub Command1_Click()   "連線"命令
Dim seting As String
Dim IPTEXT As String
Dim CHTEXT As String

RemoteViewer1.ComStopNetwork
tdelay (2)

IPTEXT = "View0_Address =" & IP.Text
CHTEXT = "View0_Channel =" & CH.Text

seting = IPTEXT & vbCrLf & "View0_view_port_n = 17860" & vbCrLf & "View0_lookup_from_ns = 0" & vbCrLf & "View0_user_name = Admin" & vbCrLf & "View0_password=" & vbCrLf & "View0_target_type = 0" & vbCrLf & CHTEXT & vbCrLf & "View0_DataFormat = 0" & vbCrLf & "View0_frame_rate = 1000" & vbCrLf & "View0_audio_buffer_time = 0" & vbCrLf & "View0_auto_reconnect = 0"

RemoteViewer1.ComSetSourceTextSetting (seting)
RemoteViewer1.ComStartNetwork (2)

Timer1.Enabled = True
End Sub

Private Sub Timer1_Timer() "取得座標資料"
GPSDT = RemoteViewer1.ComGetGPSEventText
If GPSDT <> "" Then
GPS.Text = GPSDT
Else
GPS.Text = GPS.Text & GPSDT
End If
End Sub

台長: E-vista
人氣(397) | 回應(0)| 推薦 (0)| 收藏 (0)| 轉寄
全站分類: 不分類

是 (若未登入"個人新聞台帳號"則看不到回覆唷!)
* 請輸入識別碼:
請輸入圖片中算式的結果(可能為0) 
(有*為必填)
TOP
詳全文