Jump to content
The simFlight Network Forums

Information From FSUPIC to vb.net for beginner


Recommended Posts

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.

Link to comment
Share on other sites

Hi Topdog,

Everything you need is in my .NET FSUIPC Client DLL package, available in the sticky at the top of this forum:

http://forums.simflight.com/viewtopic.php?f=54&t=53255

It contains the .NET DLL that any .NET language can use to read and write to/from FSUIPC, it has a user guide with example code in VB and an example application in VB.

Paul

Link to comment
Share on other sites

I am confused where do I put the dll file at I am using Visual Basics 2008 Express

It doesn't matter where on the disk you put it. You can just leave it wherever you unzipped the package.

The important step is to add a reference to it in your VB project. This is described step-by-step in the readme.txt file under the heading: "Installation (Step-by-Step for Visual Studio)".

When you build your application a copy of the DLL will be placed in the output folder with your .exe file. If you want to deploy your app on other machine you just copy everything in the output folder, including my DLL.

Paul

Link to comment
Share on other sites

May you please give me an example on where it should go?

If you have unzipped (extracted) the "FSUIPCDotNetClient1.3.zip" package then there is nothing more you need to do. Presumably you know where on your hard disk the files are? Just leave them there. When you add a reference to your VB project, you just need to tell Visual Studio where the DLL is on your disk. Which you already know. I can't tell you where you downloaded it to.

The instructions for adding a reference to a VB project are set out step-by-step in the readme.txt file as I said in the last message. You find this under the DOCS folder where you unzipped the package.

Paul

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

How can I declared AppTittle please forgive me I am new to the vb.net language.

If you look at the top of the file where you copied the code from, you'll see the declaration:

Private Const AppTitle As String = "FSUIPCClientExample_VB"

Put this at the top of your file in the same place. Just under the "Public Class ..." line.

Paul

Link to comment
Share on other sites

How can I echo the information begin get on my vb.net app.

I really can't help you learn how to program in VB.net on an internet forum. I can help you with specific questions about my DLL and getting data to and from FSUIPC. For general programming you need to get a book or look online for some tutorials.

The best I can do is point you to the test application I included in the package. It shows exactly how to display the data from FSUIPC on a form.

Also I kind of still don't understand how to get information with the bytes and everything

All the data from FSUIPC comes from 'offsets'. An offset is simply an address or index (expressed as Hexadecimal number) to the bit of data you want.

You find the offset address by looking at the "FSUIPC for Programmers.pdf" document. This is found in the FSUIPC SDK which you need to download if you haven't already. (http://www.schiratti.com/dowson.html)

When you find the offset address, that's the number you use when you declare the offset in VB. The TYPE of variable you use depends on the size of the offset. My "UserGuide.htm" document tells you what VB type to use depending on the information provided by the "FSUIPC for Programmers.pdf" document.

If you are new to programming then I recommend you learn how to program a basic windows application in VB, without even worrying about FSUIPC yet. Getting data from FSUIPC and using it is not a simple thing. If you are trying to learn basic programming at the same time then it's going to be extremely confusing and frustrating.

Paul

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • 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.