Hello, I am a student , new to the programming world and am having a hard time with adding methods. How do I get my program to send the information entered into 2 text boxes to display in an error msgbox?
CurrentReading = txtCurrent.Text
PreviousReading = txtPrevious.Text
GallonsUsed = (CurrentReading - PreviousReading)
Total = (GallonsUsed * Rate)
lblGalUsed.Text = GallonsUsed
lblTotal.Text = Total.ToString("c2")
If txtCurrent.Text < txtPrevious.Text Then
MessageBox.Show("ERROR: Current reading ()can not be less than Previous reading() ",
"Invalid Input",
MessageBoxButtons.OK,
MessageBoxIcon.Error)
If txtCurrent.Text < txtPrevious.Text I need to get these input numbers displayed in the msgbox.
Any help greatly appreciated,,
CurrentReading = txtCurrent.Text
PreviousReading = txtPrevious.Text
GallonsUsed = (CurrentReading - PreviousReading)
Total = (GallonsUsed * Rate)
lblGalUsed.Text = GallonsUsed
lblTotal.Text = Total.ToString("c2")
If txtCurrent.Text < txtPrevious.Text Then
MessageBox.Show("ERROR: Current reading ()can not be less than Previous reading() ",
"Invalid Input",
MessageBoxButtons.OK,
MessageBoxIcon.Error)
If txtCurrent.Text < txtPrevious.Text I need to get these input numbers displayed in the msgbox.
Any help greatly appreciated,,