Hello, I'm in an Intro to Programming Class and we were assigned to create a Temperature Converter application.
My application consists of two labels (fahrenheit, celsius), two textboxes (one for fahrenheit, celsius), and two buttons(calculate celsius, fahrenheit).
I'm a bit confused with how to code the outcome into the selected textbox.
Ex: I type something in the Fahrenheit textbox and when I click the Calculate Celsius button it displays the conversion in the Celsius textbox.
------------------------------
Also, my calculations do not seem to be working.
This is what I have so far for one button.
Sorry that this is long, but thank you for helping in advance.
My application consists of two labels (fahrenheit, celsius), two textboxes (one for fahrenheit, celsius), and two buttons(calculate celsius, fahrenheit).
I'm a bit confused with how to code the outcome into the selected textbox.
Ex: I type something in the Fahrenheit textbox and when I click the Calculate Celsius button it displays the conversion in the Celsius textbox.
------------------------------
Also, my calculations do not seem to be working.
Code:
Option Strict On
Option Explicit On
Public Class frmCelsiusFahrenheitConversion
Private Sub btnCalcCelsius_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) _
Handles btnCalcCelsius.Click
'Calculates Fahrenheit to Celsius
Dim Celsius As Single
Dim Fahrenheit As Single
Dim strCelsius
strCelsius = txtCelsius.Text
Celsius = Fahrenheit * (9 / 5) + 32
End Sub
End Class
Sorry that this is long, but thank you for helping in advance.