You are on page 1of 1

Thermometer Program Student project

ABILITY LEVEL: Beginner APPROXIMATE COMPLETION TIME: 1 hour OBJECTIVES: Use a scroll bar object OVERVIEW OF PROJECT: Create a scroll bar to represent a thermometer. As the slider on the scroll bar is moved display temperature in both Fahrenheit and centigrade in boxes on a form. PROJECT INSTRUCTIONS: 1. On a new form, create a scroll bar. 2. Set the minimum and maximum properties for the scroll bar. 3. Create label boxes to display Fahrenheit and centigrade temperatures. 4. Create label boxes to label the temperature boxes. 5. Copy the value of the scroll bar into the Fahrenheit label box in the routine reacting to changes to the scroll bar. 6. Change the value in the centigrade box by using the formula for converting Fahrenheit to centigrade when the Fahrenheit value changes. 7. Create an exit button or menu option with the appropriate code to end the program. ADDITIONAL RESOURCES: Textbook Page 14 SUGGESTED SOLUTION: The formula for converting Fahrenheit to centigrade is: C = (F 32) * (5 / 9) PROJECT EXTRAS: Add a background to the form. Perhaps a weather related picture. Set different background colors for the Fahrenheit and centigrade labels. Label the slider bar with degree markings on either side. Add buttons to move the slider to freezing and/or boiling.

You might also like