Hi Peter
I am getting a few problems with consistency within my trial application, can you please advise me on the following. I wish to load form1 and have an instance of navigator running in the background (hidden behind form1) the load event assigns a handler to the RawGpsReceived event.
AddHandler n.RawGpsReceived, AddressOf n_RawGpsReceived
When this event fires I wish to activate a timer that periodically will activate the background worker to plot the gps data. The problem is that the event doe’s not always fire when data is being received. Form1 load event is below.
Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load Try n = New InTheHand.TomTom.Navigator AddHandler n.RawGpsReceived, AddressOf n_RawGpsReceived bw = New BackgroundWorker(Me) If (n.RouteInfo.IsPlanned) Then n.ClearRoute() AddHandler bw.DoWork, AddressOf bw_DoWork AddHandler bw.RunWorkerCompleted, AddressOf bw_RunWorkerCompleted Catch ex As Exception MsgBox(Err.Description, MsgBoxStyle.Critical, "Load Event") End Try End Sub ‘rawgpsreceived Private Sub n_RawGpsReceived(ByVal sender As Object, ByVal e As RawGpsReceivedEventArgs) Try RawCancel() Catch ex As Exception MsgBox(Err.Number, MsgBoxStyle.Critical, "Raw GPS") Finally RawCancel() End Try End Sub
When I check navigator the gps data is being plotted but the RawGpsReceived event has not fired. On other occaisions the evvnt doe's fire?
Regards,
Joe