C
Charlie Brookhart
I am trying to figure out how to code a button labeled reset which will
clear the user input as well as clear out the two read-only text boxes. Here
is the program code that I have.
'declaring variables
Dim totalLiters As Double = Convert.ToDouble(txtLiters.Text)
Dim totalPints As Double = Convert.ToDouble(txtPints.Text)
Dim totalGallons As Double = Convert.ToDouble(txtGallons.Text)
'assigning text box values to variables
totalLiters = txtLiters.Text
totalPints = txtPints.Text
totalGallons = txtGallons.Text
'performing calculations
txtPints.Text = totalLiters * 2.1133
txtGallons.Text = totalLiters * 0.26
clear the user input as well as clear out the two read-only text boxes. Here
is the program code that I have.
'declaring variables
Dim totalLiters As Double = Convert.ToDouble(txtLiters.Text)
Dim totalPints As Double = Convert.ToDouble(txtPints.Text)
Dim totalGallons As Double = Convert.ToDouble(txtGallons.Text)
'assigning text box values to variables
totalLiters = txtLiters.Text
totalPints = txtPints.Text
totalGallons = txtGallons.Text
'performing calculations
txtPints.Text = totalLiters * 2.1133
txtGallons.Text = totalLiters * 0.26