Hi all
I am not sure if this is a problem - or if i am on the right path or not even close. When i run the program it loads, I do not get any errors but i can NOT get the resultLabel to show the addition Math or answer
the code below: (its not really HTML code....
I am using Visual Basic Express 2008
I am not sure if this is a problem - or if i am on the right path or not even close. When i run the program it loads, I do not get any errors but i can NOT get the resultLabel to show the addition Math or answer
the code below: (its not really HTML code....
I am using Visual Basic Express 2008
HTML:
'Declares Local Variables
Dim num1Decimal As Decimal
Dim num2Decimal As Decimal
Dim resultLabel As Decimal
'Place the Data in the Variables
num1Decimal = Val(num1.Text)
num2Decimal = Val(num1.Text)
'This is the information from the radiobuttons
' Create and initialize a GroupBox and a Button control.
Dim spinGroupBox As New GroupBox
Dim resultADecimal As Decimal
Dim spin1b As Decimal
Select Case True
Case spin1RadioButton.Checked
spin1b = 0.095
Case spin2RadioButton.Checked
spin1b = 0.085
Case spin3RadioButton.Checked
spin1b = 0.08
Case spin4RadioButton.Checked
spin1b = 0.08
Case spin5RadioButton.Checked
spin1b = 0.08
End Select
resultADecimal = spin1b
' Create and initialize a GroupBox and a Button control.
Dim windGroupBox As New GroupBox
Dim wind1b As Decimal
Dim resultBDecimal As Decimal
Select Case True
Case upRadioButton.Checked
wind1b = 0.095
Case ULRadioButton.Checked
wind1b = 0.085
Case urRadioButton.Checked
wind1b = 0.075
Case downRadioButton.Checked
wind1b = 0.07
Case dlRadioButton.Checked
wind1b = 0.065
Case drRadioButton.Checked
wind1b = 0.06
Case leftRadioButton.Checked
wind1b = 0.055
Case rightRadioButton.Checked
wind1b = 0.05
End Select
resultBDecimal = wind1b
' Create and initialize a GroupBox and a Button control.
Dim locationGroupBox As New GroupBox
Dim location1b As Decimal
Dim resultCDecimal As Decimal
Select Case True
Case fairwayRadioButton.Checked
location1b = 0.095
Case firstCutRadioButton.Checked
location1b = 0.085
Case secondCutRadioButton.Checked
location1b = 0.075
Case deepRadioButton.Checked
location1b = 0.07
Case sandRadioButton.Checked
location1b = 0.065
Case weedsRadioButton.Checked
location1b = 0.06
Case mulchRadioButton.Checked
location1b = 0.055
End Select
resultCDecimal = location1b
' Create and initialize a GroupBox and a Button control.
Dim swingGroupBox As New GroupBox
Dim swing1b As Decimal
Dim resultDDecimal As Decimal
Select Case True
Case fullRadioButton.Checked
swing1b = 0.095
Case pitchRadioButton.Checked
swing1b = 0.085
Case chipRadioButton.Checked
swing1b = 0.075
Case flopRadioButton.Checked
swing1b = 0.07
Case punchRadioButton.Checked
swing1b = 0.065
End Select
resultDDecimal = swing1b
' Create and initialize a GroupBox and a Button control.
Dim lieGroupBox As New GroupBox
Dim lie1b As Decimal
Dim resultEDecimal As Decimal
Select Case True
Case lie1RadioButton.Checked
lie1b = 0.095
Case lie2RadioButton.Checked
lie1b = 0.085
Case lie3RadioButton.Checked
lie1b = 0.075
Case lie4RadioButton.Checked
lie1b = 0.07
Case lie5RadioButton.Checked
lie1b = 0.065
Case lie6RadioButton.Checked
lie1b = 0.06
Case lie7RadioButton.Checked
lie1b = 0.055
Case lie8RadioButton.Checked
lie1b = 0.05
End Select
resultEDecimal = lie1b
' Calculate and Display the Yards to Hole needed.
resultLabel = num1Decimal + (num1Decimal * resultADecimal) + (num2Decimal * resultBDecimal) + (num1Decimal * resultCDecimal) + (num1Decimal * resultDDecimal) + (num1Decimal * resultEDecimal)