|
|
|
|
|
Learn Visual Basic 6.0 |
|
The application should have a scroll bar which adjusts temperature in degrees Fahrenheit from some reasonable minimum to some maximum. As the user changes the scroll bar value, both the Fahrenheit temperature and Celsius temperature (you have to calculate this) in integer format should be displayed. The formula for converting Fahrenheit (F) to Celsius (C) is: C = (F - 32)*5/9 To convert this number to a rounded integer, use the Visual Basic CInt() function. To change numeric information to strings for display in label or text boxes, use the Str() or Format() function. Try to build as much of the application as possible before looking at my approach. Try incorporating lines and shapes into your application if you can. |
| Form1: | BorderStyle | 1-Fixed Single |
|---|---|---|
| Caption | Temperature Conversion | |
| Name | frmTemp | |
| Shape1: | BackColor | White |
| BackStyle | 1-Opaque | |
| FillColor | Red | |
| FillStyle | 7-Diagonal Cross | |
| Shape | 4-Rounded Rectangle | |
| VScroll1: | LargeChange | 10 |
| Max | -60 | |
| Min | 120 | |
| Name | vsbTemp | |
| SmallChange | 1 | |
| Value | 32 | |
| Label1: | Alignment | 2-Center |
| Caption | Fahrenheit | |
| FontSize | 10 | |
| FontStyle | Bold | |
| Label2: | Alignment | 2-Center |
| AutoSize | True | |
| BackColor | White | |
| BorderStyle | 1-Fixed Single | |
| Caption | 32 | |
| FontSize | 14 | |
| FontStyle | Bold | |
| Name | lblTempF | |
| Label3: | Alignment | 2-Center |
| Caption | Celsius | |
| FontSize | 10 | |
| FontStyle | Bold | |
| Label4: | Alignment | 2-Center |
| AutoSize | True | |
| BackColor | White | |
| BorderStyle | 1-Fixed Single | |
| Caption | 0 | |
| FontSize | 14 | |
| FontStyle | Bold | |
| Name | lblTempC | |
| Command1: | Alignment | 2-Center |
| Cancel | True | |
| Caption | E&xit | |
| Name | cmdExit |