467,114 Members | 1,330 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,114 developers. It's quick & easy.

How do i make a fully working progress bar?

um, mine progress bar isnt working, it come up with an error like this



this is the code
Expand|Select|Wrap|Line Numbers
  1. Private Sub Timer1_Timer()
  2. Timer2.Enabled = True
  3. If ProgressBar1.Value = "90" Then
  4. Timer1.Enabled = False
  5. Label1.Caption = "Rofl Pantofl"
  6. End If
  7. End Sub
  8.  
  9. Private Sub Timer2_Timer()
  10. ProgressBar1.Value = ProgressBar1.Value + 10
  11. If ProgressBar1.Value = "200" Then
  12. Label1.Caption = "uber roflpantofl"
  13. End If
  14. End Sub
  15.  
I use vb6.
Nov 23 '06 #1
  • viewed: 2318
Share:
1 Reply
100+
um, mine progress bar isnt working, it come up with an error like this



this is the code
Expand|Select|Wrap|Line Numbers
  1. Private Sub Timer1_Timer()
  2. Timer2.Enabled = True
  3. If ProgressBar1.Value = "90" Then
  4. Timer1.Enabled = False
  5. Label1.Caption = "Rofl Pantofl"
  6. End If
  7. End Sub
  8.  
  9. Private Sub Timer2_Timer()
  10. ProgressBar1.Value = ProgressBar1.Value + 10
  11. If ProgressBar1.Value = "200" Then
  12. Label1.Caption = "uber roflpantofl"
  13. End If
  14. End Sub
  15.  
I use vb6.
hi

declare your progressbar.value as value, not as string !
If ProgressBar1.Value = "90" Then
should be
If ProgressBar1.Value = 90 Then

look at your progressbar property: max and min
values should lay between those 2 values

in case the progressbar.value should exceed the max-value
build an errortrap such as


if Newvalue>Progressbar.Max then
Newvalue=Progressbar.Min
else
ProgressBar.Value=NewValue
endif
Nov 23 '06 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

1 post views Thread by zacks@construction-imaging.com | last post: by
19 posts views Thread by felixnielsen@hotmail.com | last post: by
25 posts views Thread by cmd@mountain.net | last post: by
1 post views Thread by daniel_xi | last post: by
3 posts views Thread by ctbfalcon@gmail.com | last post: by
2 posts views Thread by Alex | last post: by
7 posts views Thread by Tom | last post: by
69 posts views Thread by Bill Reid | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.