C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Communities   Interview   Jobs   Projects   Offshore Development    
Silverlight Tutorials | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...

New Feature: Community Sites: Create your own .NET community website and start earning from Google AdSense ! It's Free !






Progress bar sample in VB.net windows Application


Posted Date: 14 Aug 2008    Resource Type: Code Snippets    Category: Winforms Controls

Posted By: D.Jeya kumar(JK)       Member Level: Diamond
Rating:     Points: 10



This code sample uses a Progress bar control in a windows Application. Add a new Progress bar control and add a new timer to a windows application form. Set the Progress bar's Step property to 20. Go the property of the timer and add set the Enable property of the timer to true.


In form load add the below code to initialize the progress bar Control
ProgressBar1.Minimum = 0
ProgressBar1.Maximum = 100
ProgressBar1.Value = 0
On double click of the timer event it will add the timer_tick event and add the progress bar code in timer event
ProgressBar1.Value += 2
If ProgressBar1.Value >= 100 Then
ProgressBar1.Value = 0
End If

Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
ProgressBar1.Value += 2
If ProgressBar1.Value >= 100 Then
ProgressBar1.Value = 0
End If

End Sub


Run the application - this will fill the progress bar and it will again reset and the cycle .
If you want to fill the progress bar once. Add the below code in the timer event


If ProgressBar1.Value >= 100 Then
Timer1.Enable=False
End If




Responses


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

Feedbacks      
Popular Tags   What are tags ?   Search Tags  
Windows Forms ProgressBar control  .  Using Progress Bars in applications  .  Using Progress Bar control in Windows  .  Progress bar sample in VB.net windows Application  .  Progress bar control  .  

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: To Create Dynamic Text Box
Previous Resource: tabControl with Hotkeys and Disabling individual tab pages features
Return to Discussion Resource Index
Post New Resource
Category: Winforms Controls


Post resources and earn money!
 
Related Resources



dotNet Slackers   BizTalk Adaptors    Web Design

efax

Contact Us    Privacy Policy    Terms Of Use