hi all
i want to make a temperature gauge using scroll bar (pls refer to Attachments)
it has label to show the text of current temperature and if you are noticed the are also two labels in blue and red which indicates coolness or hotness.the problem is when the temperature reached certain point for example 50 Celsius,the color label is not working.i mean initially i set red label,visible = true thus make blue label visible and it indicates the temperature is still cool but when scroll it to 50 Celsius,the red label is not shown up and blue label is still there.also not working when i decrease the temperature less than 50 Celsius.
here is the code
Public Class Form1
Inherits System.Windows.Forms.Form
Private Sub vsbCount_Change(ByVal newScrollValue As Integer)
lblCount.Text = CStr(newScrollValue)
End Sub
Private Sub vsbCount_Scroll(ByVal sender As System.Object, ByVal eventArgs As System.Windows.Forms.ScrollEventArgs) Handles vsbCount.Scroll
Dim vsbCount As Integer
Select Case eventArgs.Type
Case System.Windows.Forms.ScrollEventType.EndScroll
vsbCount_Change(eventArgs.NewValue)
End Select
If vsbCount < 50 Then
lblBlue.Visible = True
lblRed.Visible = False
ElseIf vsbCount < 100 Then
lblRed.Visible = True
lblBlue.Visible = False
End If
End Sub
End Class