How to get started with a new project.

It is not uncommon to be lost when you first start a new program. The following is a suggested plan to follow AFTER the interface has been drawn.

First

Determine which controls (probably textboxes) the user will use to enter input values.

Determine which control the main coding will be "behind". By "behind" I mean which control (probably a button)  you willclick after entering input.

Double-click on this control. An event handler shell will be created. Much of the code you add will be added between the Private Sub... line and the End Sub  line.

Second

Declare variables variables for each numeric input value

To determine the appropriate data type think about the kind of number it will be. Will it always be a whole number? If so an Integer data type is probably appropriate. Does the value represent a dollar amount? If so Decimal would be an appropriate choice.

Declare variables to store the result of arithmetic expressions. (These are often output values)

To determine the data type remember that the data type of the result of an expression is often determined by the operands in the expression.

An Integer added, multiplied or subtracted from another Integer will produce an Integer.

Regular division (/) always results in a number with decimal positions.

Integer division (\) and modulus division (Mod) result in Integers.

Don't worry about declaring ALL the variables you will need. You can always declare more as you find the need for them.

Third

Store all numeric input values (usually from the Text property of a TextBox) in the appropriate variables.  Use Convert.ToXXXX to convert the input value to the appropriate numeric data type.    

Example:  intNumChildren = Covert.ToInt32(txtNumChildren.Text)

Fourth

Do necessary processing / calculations.

Fifth

Report output in output labels. Formatting as necessary.

Example:  lblTotalCost.Text = decTotalCost.ToString("c")

Finally

Set focus back to an appropriate TextBox.

 

In addition:

Add code in GotFocus or Enter event handlers to select the contents of the TextBoxes when the TextBox receives Focus. Every TextBox needs such a procedure.