How can I keep looping that just put that in the timmer function thing
ex:
Private Sub Timer1_Tick_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
Try
' Process the default group
FSUIPCConnection.Process()
' IAS - Simple integer returned so just divide as per the
' FSUIPC documentation for this offset and display the result.
Dim airpeedKnots As Double = (airSpeed.Value / 128D)
Label20.Text = airpeedKnots.ToString("f1")
Me.Label19.Text = Heading.Value.ToString("000")
Catch exFSUIPC As FSUIPCException
If exFSUIPC.FSUIPCErrorCode = FSUIPCError.FSUIPC_ERR_SENDMSG Then
Me.Timer1.Enabled = False
FSUIPCConnection.Close()
MessageBox.Show("The connection to Flight Sim has been lost.", AppTitle, MessageBoxButtons.OK, MessageBoxIcon.Exclamation)
Else
' not the disonnect error so some other baddness occured.
' just rethrow to halt the application
Throw exFSUIPC
End If
Catch ex As Exception
' Sometime when the connection is lost, bad data gets returned
' and causes problems with some of the other lines.
' This catch block just makes sure the user doesn't see any
' other Exceptions apart from FSUIPCExceptions.
End Try
End Sub
End Class
Is that the correct way?
Also please forgive me I am new to the vb.net thank you.
Also the following code above is giving me 000 when my current heading 197
This is how I get the heading info
Dim Heading As New FSUIPC.Offset(Of Double)("indh", &H2CC)
Label19.Text = Heading.Value.ToString("000")