2011-06-14 09:30:40E-vista

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

前些日子買了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