Create an application in which a user can enter a numeric value using one scroll bar between 0 to 100 and displays conversion of the value into Fahrenheit in VB.NET.
Public Class Form1
Private Sub ScrollBar_Scroll(ByVal sender As System.Object, ByVal e As System.Windows.Forms.ScrollEventArgs) Handles ScrollBar.Scroll
Dim f, t As Double
ScrollBar.Maximum = 100
t = ScrollBar.Value
f = t * (9 / 5) + 32
LblFagrenheitValue.Text = f
LblScrollBarValue.Text = ScrollBar.Value
End Sub
End Class
Private Sub ScrollBar_Scroll(ByVal sender As System.Object, ByVal e As System.Windows.Forms.ScrollEventArgs) Handles ScrollBar.Scroll
Dim f, t As Double
ScrollBar.Maximum = 100
t = ScrollBar.Value
f = t * (9 / 5) + 32
LblFagrenheitValue.Text = f
LblScrollBarValue.Text = ScrollBar.Value
End Sub
End Class
Comments
Post a Comment