Here is what I have now and it doesn't work... Could someone help me out a bit and change something around, so it works (And yes, the timer is enabled, the interval is 1)(nothing is underlined blue, so the code is correct, but it doesn't change the fuel (and the fuel tank is set to 1, which is all tanks))?
Imports FSUIPC
Public Class Form1
Private Const AppTitle As String = "FSUIPCClientExample_VB"
Dim Fuel As Offset(Of Integer) = New FSUIPC.Offset(Of Integer)(&HAF4)
Dim Tank As Offset(Of Integer) = New FSUIPC.Offset(Of Integer)(&HAF8)
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Tank.Value = 1
End Sub
Private Sub button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles button2.Click
Try
FSUIPCConnection.Open()
MsgBox("Connected :)")
Catch ex As Exception
MessageBox.Show(ex.Message, AppTitle, MessageBoxButtons.OK, MessageBoxIcon.Error)
End Try
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Fuel.Value = TrackBar1.Value / 256
End Sub
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
TextBox1.Text = TrackBar1.Value / 256
End Sub
End Class