A Small Air Damage Calc Program Part 1

Day 3,168, 06:02 Published in Serbia Ireland by Releasethe Krakken

Requirements:

Microsoft Access
Microsoft VB.Net (visual basic .net)

Program was provided by I-G-D in C++ . I was originally educated in C++ so can basically follow what he does.

At first he created 2 arrays 1 for rankpoints and 1 for rank name

I simplified that to a MS Access table called RSC_Ranks. RSC because I will use it as a constant resource and not add data to it via the program. In other words I typed in all data.



The second thing I did is add 2 columns for the above arrays in the table as well as a key to correspond to I-G-D 's format



I then typed in the data



Now I created a VB.Net program called AirBattles

I created a component called DSAir(project -> Add Component)

I went to the form screen of the component and from the Data list I selected the oledbdataadapter I right clicked the data adapter and selected Configure Data Adapter and clicked next on the screen that appeared. I then selected the database where I created the RSC_Ranks table I placed this in a C😐 folder AirBattles as Windows protects it Program Files folder. So never place your programs here. If I intended it this as a network program I would have created a Frontend database and linked the RSC_Table to this frontend. And added queries if I needed to. I would in my program link to the frontend not the backend to avoid concurrency issues. Also I would place my backend on a cloud and use frontends to work anywhere I wanted from this program with no need to carry usb sticks around.

but this is a very simple program so no need for that. Click Next after selecting database and click next again this will drop you on the Query page click on Query Builder.



Select your table and just select all columns and press on Ok this will create the following basic query which will suffice for now.


Click Next the wizard will display the following screen



Click on finish and type in its name oledbRSCRanks

Next right click the component form screen and select Generate Dataset. in new dataset type in XMLAir to create the XML file.

Then you double click on the component screen to create basic input and output from the oledbdataadapter



Go to form 1 select from the toolbox under the heading Data the Dataset component. It will appear below your form Select Name and enter DSRanks(this is just my convention)


Now double click the form and enter into form_load event the following



Now select a datagrid from the toolbox and drag its shape onto the form and from its properties set Datasource to DSRanks and datamember to RSC_Ranks



enter a name for it my name is dgRanks

We test it by pressing the Run button giving us this



Now we select 2 labels from the toolbox and draw them by dragging them below the datagrid.

Set bachcolor to whitesmoke and borderstyle to fixedsingle give them names lblRankname and lblRankPoints delete all text from them.

double click on the datagrid

click on the downwards arrow next to navigate and select Currentcellchanged from the dropdown menu

enter the following code here.



As you click on your rank it will display in the labels below with the rankpoints required for the rank.



That concluded Part 1 and was how far I got with I-G-D' s program.



(