473,396 Members | 1,599 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

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
1 2437
albertw
267 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

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

Similar topics

1
by: zacks | last post by:
I am using VB.NET 2005, but I have seen this problem in 2003 also. I have a windows form based application. When the user clicks on the main command button it goes off and does its thing. It...
19
by: felixnielsen | last post by:
Some might remember that i, not so long ago, started a treath or two about a weird 3d labyrinth. I now have a working code, that i want to share, hear comments, advice, ect., but first let me...
25
by: cmd | last post by:
Hi all, I wanted to rule out other possibilities before suggesting a memory upgrade for a user who owns a Dell Inspiron 6000 laptop with 512 MB of ram. I have a report based on a parameters...
1
by: daniel_xi | last post by:
Hi all, I am running a VS 2003 .NET project on my client machine (Win 2000 SP4, ..NET framework 1.1), running an ASP.NET application on a remote web server (Win 2000 Server, IIS 6.0, .NET...
3
by: ctbfalcon | last post by:
So I have a progress bar that I would like to be diplayed as the program is working on adding a network printer. I want to do this because while the program is "thinking" the user is not sure if...
2
by: Alex | last post by:
Dear coleagues, I am trying to call FindWindow function but it seems not to be working. It returns a loooooong value even if the Window "SoftMaxPro GxP" is not started. I can't even find a...
7
by: Tom | last post by:
By my estimate, greater than 90% of the online doco code does not work without additional coding effort. Fully working solutions are invaluable for the student. A guru's work measured in minutes...
1
by: Shan | last post by:
Hi... I am trying to get progress of a backend task, which is initiated from web gui.... To achieve it i am using Ajax. To get recent progress of backend task, i am calling the same Ajax...
69
by: Bill Reid | last post by:
This is how I handle a check that the last character of a text file is a newline: /* checks if newline is last character of text file */ unsigned check_text_file_newline_termination(FILE...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.