Program to convert temperature from centigrade to Fahrenheit using vertical scroll bar which is scrolling automatically on every interval of timer control.

Dim i As Boolean
Private Sub Form_Load()
t = False
End Sub
Private Sub Timer1_Timer()
If VScroll1.Value <= 40 Then
t = False
End If
VScroll1.Value = VScroll1.Value + 1
If VScroll1.Value >= 100 Then
t = True
End If
If t = True Then
VScroll1.Value = VScroll1.Value - 2
End If
End Sub

Private Sub VScroll1_Change()
Text1.Text = VScroll1.Value & "C"
Text2.Text = ((9 * VScroll1.Value) + 100) / 5 & "F"
End Sub

No comments:

Post a Comment