Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void hsb_Scroll(object sender, ScrollEventArgs e)
- {
- Single Celsius, Fahrenheit;
- Celsius = hsb.Value ; // hsb= horizontal scroll bar, The value of the scroll bar controlls celsius.
- txtbc.Text = Convert.ToString(Celsius) ; // txtbc is the text box for celsius, they look better than labels. Ps: you dont have to do text boxes but regardless its the same code.
- Fahrenheit = ((Celsius * 9 / 5) + 32); // conversion of Celsius to Fahrenheit.
- txtbf.Text = Convert.ToString(Fahrenheit) ; // Places the equation answer into the Fahrenheit Text box
- }
- private void btnclose_Click(object sender, EventArgs e)
- {
- Application.Exit(); // closes the program with the button
- // matt had his equations wrong and had a random box that he labeled "Temperature". You dont need this exta box as it does nothing and makes the equations invalid.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement