Jump to content
The simFlight Network Forums

topdog

Members
  • Posts

    13
  • Joined

  • Last visited

topdog's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Here it is: Dim altitude As Offset(Of Integer) = New FSUIPC.Offset(Of Integer)(&H570) Label29.Text = altitude.Value.ToString("00,000") That is all I have for the altitude portion.
  2. As Pete explained, 32 bits is the same as 4 bytes which is an Integer in VB.NET. So declare the offset as: Dim altitude As Offset(Of Integer) = New FSUIPC.Offset(Of Integer)(&H574) Paul I am confused that is how I did it and it still comes out to a big number.
  3. Sorry, I am still new to VB. Also I see it where it says 32 bit but I don't know how will I code that in the program I am working on?
  4. Ok I got the heading thing to work but now I am lost, I can get the altitude but it comes out to this big number why is that Dim altitude As Offset(Of Integer) = New FSUIPC.Offset(Of Integer)(&H570) Label29.Text = altitude.Value.ToString("00,000") Also how can I get it so that it will display the right format?
  5. So can I get an example please of the timer thing, because I am still lost. Also look at this please. Dim Heading As New FSUIPC.Offset(Of Double)("indh", &H2CC) I have already group it.
  6. 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")
  7. Now I know how to get the information and the basic stuff. I was also wondering 2 things. How come when I got the heading info it came out to a big number with the actual heading to the left of the decimal. For example, in Flight Sim I set my heading to 050 in VB.NET it shows 50.0217981453628 how can I just have it just show 050. Also how can I have the numbers update automatically for it to change, for some reason I always have to close the program I am building and restart it. I want it to update automatically how can I do that? This is the heading dim part Dim Heading As New FSUIPC.Offset(Of Double)("indh", &H2CC) I got the airspeed to update automatically how can I do the heading an altitude?
  8. Can somebody please give an example of how I can get like the aircraft speed or altitude from the FS into visual basic? Then show it on the application I know how to make the variable a little bit here is an example. Dim FlightSimVersion As New FSUIPC.Offset(Of Integer)(&H3308) Dim AircraftName As New FSUIPC.Offset(Of String)(&H3D00, 256) Dim AirSpeed As New FSUIPC.Offset(Of Integer)("1", &H2BC) Dim OnGround As New FSUIPC.Offset(Of Short)("1", &H366) Dim PreLongitude As New FSUIPC.Offset(Of Long)(&H560) Dim PreLatitude As New FSUIPC.Offset(Of Long)(&H568) Dim Altitude As New FSUIPC.Offset(Of Long)(&H570) Dim GroundSpeed As New FSUIPC.Offset(Of Integer)(&H2B4) Now what i have to do?
  9. How can I echo the information begin get on my vb.net app. Also I kind of still don't understand how to get information with the bytes and everything please help.
  10. ok I have followed the directions and I have one problem with the following line: MessageBox.Show(ex.Message, AppTitle, MessageBoxButtons.OK, MessageBoxIcon.Error) and I am getting the following error Name 'AppTitlte' is not declared. How can I declared AppTittle please forgive me I am new to the vb.net language.
  11. I am confused where do I put the dll file at I am using Visual Basics 2008 Express
  12. I am noob I guess you can call it when it comes to vb.net(Visual Basics 2008). I was wondering can somebody show me so some code that will grab information from the Flight Sim and show it on a vb.net windows application form. I have read the FSUPIC tutorials and I am still not understanding it. I am in the process of designing an ACARS system and I want it to be set up so that i the user clicks Pre Flight and the Sim is not started it will display a message. How should I do that? Also show other information like current speed and everything. I hope I am not asking for to much I have been reading around but still cant find anything to help me. And if you have some great tutorials links please post them anything that would get me going off to a good start of designing an ACARS. Thanks in Advanced.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.