Hi
I am use progress bar in one form,if i call progress bar form another form,need to show progress bar with animation,like timer start and show progressing in progress bar.How to start timer and show progress bar in another form.
E.g.I have form1 and form2,in form1 i have one button,in form2 i have progress bar with timer start and progressing code like below
Public Class ProgressBar
Private ticks As Integer = 0
Private Sub Timer1_Tick_1(sender As Object, e As EventArgs) Handles Timer1.Tick
ticks += 1
ProgressBar1.Value1 = ticks
If ticks = 100 Then
ticks = 0
End If
End Sub
Private Sub ProgressBar_FormClosing(sender As Object, e As FormClosingEventArgs) Handles Me.FormClosing
Timer1.Enabled = False
End Sub
Private Sub ProgressBar_Load(sender As Object, e As EventArgs) Handles Me.Load
Timer1.Enabled = True
End Sub
End Class
In above code i will start progress,once timer ticks reach 100 aging i restart progress,here once form2 start ,i start progress animation and once form2, close i stop progress bar animation.Here i start form2 page directly it work fine,but if i call form2 from form1 button click event it will not show progress bar animation,simply it appear without progress animation.
Below is form1 button click event.
Dim proBar As New ProgressBar
proBar.Show()
Why if open form2 directly it work,if call form another page it not work ?
Note:In form1 button click event i have some other process,i.e i will load lot of nodes(more than 10000 nodes) in treeview,it take more time and it hang few mins,so here i need to call progress bar,so once start load nodes in treeview i need to call progress bar and once finish need to close progress bar.
Pls reply asap
Regards
Aravind