C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Reviews   Communities   Interview   Jobs   Projects   Training   Your Ad Here    
Silverlight Games | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Polls | Revenue Sharing | Lobby | Gift Shop |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...






Resources » Code Snippets » VB.NET Syntax »

Vb.Net control horizontal scorll bar


Posted Date: 26 Aug 2009    Resource Type: Code Snippets    Category: VB.NET Syntax
Author: NeetuMember Level: Diamond    
Rating: 1 out of 5Points: 6



Conversion from Fahrenheit to celsius.





Private Sub hsbTemp_Scroll(ByVal sender As System.Object, ByVal e As System.Windows.Forms.ScrollEventArgs) Handles hsbTemp.Scroll
Dim TempF As Single, TempC As Single
'Read F and convert to C - divide by 10 needed since Value is tenths of degrees
TempF = CSng(Val(hsbTemp.Value) / 10)
'check to see if changed from hot to cold or vice versa
If IsHot And TempF < 70 Then
'changed to cold
IsHot = False
lblBlue.BringToFront()
hsbTemp.BringToFront()
ElseIf Not (IsHot) And TempF >= 70 Then
'changed to hot
IsHot = True
lblRed.BringToFront()
hsbTemp.BringToFront()
End If
lblTempF.Text = Format(TempF, "0.0")
TempC = (TempF - 32) * 5 / 9
lblTempC.Text = Format(TempC, "0.0")
End Sub



Check the attachement.
regards
Neetu


Attachments

  • Conversion of temperature (31849-261142-Example 4-2.rar)


  • Responses


    No responses found. Be the first to respond and make money from revenue sharing program.

    Feedbacks      
    Popular Tags   What are tags ?   Search Tags  
    Sign In to add tags.
    Conversion of temperature.  .  

    Post Feedback


    This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
    You must Sign In to post a response.
    Next Resource: Creating virtual table in vb.net using console application.
    Previous Resource: Accessing MDIParent Methods from MDI Child Form
    Return to Discussion Resource Index
    Post New Resource
    Category: VB.NET Syntax


    Post resources and earn money!
     
    More Resources



    dotNet Slackers

    About Us    Contact Us    Privacy Policy    Terms Of Use