Click here to Skip to main content
15,895,084 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi all,

am working on vb.net 2008 application. First am created on Form called SM_Progress.vb. In that i added the progress bar control and set merqueryAnimationspeed 30. Am created one more windows form and added two button and one textbox and folder browsingDialog. Now for me i want show the SM_progress form when am clicking the one button. i wrote the code like this in click event.
VB
SM_Progress.Show()
Application.DoEvents()

Its only showing the form .Progress bar is not rotating.. How can i run the progress bar for particular operation done in the button click event.?
Posted
Updated 27-Dec-11 18:28pm
v2

Have you set the Style?
C#
myProgressBar.Style = ProgressBarStyle.Marquee;
Should do the trick.
 
Share this answer
 
To show ProgressBar working you have to use Timer control.On Timer_Tick event of Timer control write the following code :
VB
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
        ProgressBar1.Value = ProgressBar1.Value + 1
End Sub

Now write following code on Button where you open SM_Progress Form :
VB
Timer1.Interval = 100
Timer1.Enable = True
Timer.Start()

I hope it will help you. :)
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900