|
-
Apr 30th, 2006, 11:55 PM
#1
Thread Starter
Registered User
help me please
i have a progress bar and a button named Scan ian i want it to scan so the progress bar works
and none of the book i read sayed anything about it
-
May 1st, 2006, 12:03 AM
#2
Member
Re: help me please
what i do is a progress bar.. i divide the number of events or w/e im doing into a hundred... and each time each event is done just do soemthing live
Progressbar.value += 4
is this what you meant?
-
May 1st, 2006, 12:13 AM
#3
Re: help me please
A ProgressBar is supposed to indicate the progress of something. What is it that you're attempting to indicate the progress of? If you have a task that is broken into a set number of subtasks and each of these is given equal weighting in the progress then you would set the Maximum to the number of tasks, the Step to 1 and then call PerformStep each time you want to advance the progress. If you have multiple subtasks that have unequal weighting then you'd do something like what c0rrupt suggested. If you don't know exactly how much or how long processing will occur then you can't really do either of these things. If you're using VB 2005 then you set the Style of the ProgressBar to Marquee and it will just animate indefinitely until you stop it.
-
May 1st, 2006, 01:18 AM
#4
Thread Starter
Registered User
Re: help me please
no i need a code for aprogress bar so it will move
-
May 1st, 2006, 09:18 AM
#5
Re: help me please
 Originally Posted by SeanTVoth
no i need a code for aprogress bar so it will move
Hi Sean,
Here's an example for a progressBar.
VB Code:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
ProgressBar1.Value = 1
ProgressBar1.Visible = True
Timer1.Enabled = True
End Sub
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
ProgressBar1.Value = ProgressBar1.Value + 1
If ProgressBar1.Value >= 10 Then
Timer1.Enabled = False
ProgressBar1.Visible = False
End If
End Sub
I hope it's a start,
sparrow1
-
May 1st, 2006, 09:34 AM
#6
Thread Starter
Registered User
Re: help me please
thanks now is there a way when the progessbar is done then a message box wil pop up
-
May 1st, 2006, 10:16 AM
#7
Re: help me please
 Originally Posted by SeanTVoth
thanks now is there a way when the progessbar is done then a message box wil pop up
Yes there's a possibility:
VB Code:
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
ProgressBar1.Value = ProgressBar1.Value + 1
If ProgressBar1.Value >= 10 Then
Timer1.Enabled = False
ProgressBar1.Visible = False
MsgBox("The progressBar has stopt")
End If
End Sub
Wkr,
sparrow1
-
May 2nd, 2006, 01:14 AM
#8
Thread Starter
Registered User
Re: help me please
i have a button and i need it to pause the progessbar
-
May 2nd, 2006, 01:18 AM
#9
Re: help me please
 Originally Posted by SeanTVoth
i have a button and i need it to pause the progessbar
When you Click the button just Stop the Timer.
-
May 2nd, 2006, 10:30 AM
#10
Re: help me please
 Originally Posted by SeanTVoth
i have a button and i need it to pause the progessbar
Hi,
Like jm said;
Wkr,
sparrow1
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|