473,396 Members | 2,052 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.

Q: Updating a smooth progress control

Hi

I have been using a smooth progress control using the following link:

http://support.microsoft.com/default...en-us;323088#2

It works well, however I can't seem to get it to update properly.

For example, I created a test application which had the smooth progress form
and the "standard" progress control supplied with Visual Studio. I set up
the two controls to increment using the following code:

ProgressBar1.Minimum = 0
ProgressBar1.Maximum = 11
ProgressBar1.Value = 0
MySmoothProgressBar1.Minimum = 0
MySmoothProgressBar1.Maximum = 11
MySmoothProgressBar1.Value = 0

For i As Integer = 0 To 10
For j As Integer = 0 To 100000000
'Do Nothing
Next
MySmoothProgressBar1.Value += 1
ProgressBar1.Value += 1
Next

The standard progress control increments as expected. However, the smooth
progress control only updates at the end i.e. when the standard progress
control has reached its maximum.

Can anybody help with this?

Thanks in advance

Geoff

Nov 21 '05 #1
2 1612
"Geoff Jones" <no********@email.com> schrieb:
For i As Integer = 0 To 10
For j As Integer = 0 To 100000000
'Do Nothing
Next
MySmoothProgressBar1.Value += 1
ProgressBar1.Value += 1
Untested:

\\\
Me.ProgressBar1.Refresh()
///
Next

The standard progress control increments as expected. However, the smooth
progress control only updates at the end i.e. when the standard progress
control has reached its maximum.


--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
Nov 21 '05 #2
Hi Herfried

Genius!!!

Thanks. That did the trick.

As a matter of interest, and in the hope that the best way to learn is to
experiment, what methods could I use to implement the same thing within the
Microsoft progress control and why doesn't the current code work? That is,
by looking at their code, I see in the "Value" function:

Me.Invalidate(updateRect)

so the code has been written to update the progress control after a value
re-assignment e.g.

SmoothProgressBar1.Value += 1

would call the "Invalidate" (which I assume is used for re-painting?).
However, it doesn't do it! Indeed, when I tried to debug the code I fount
that OnPaint was not called after this "Invalidate" (I expected it would).

Has anyone any thoughts?

Geoff

"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:Ov**************@TK2MSFTNGP11.phx.gbl...
"Geoff Jones" <no********@email.com> schrieb:
For i As Integer = 0 To 10
For j As Integer = 0 To 100000000
'Do Nothing
Next
MySmoothProgressBar1.Value += 1
ProgressBar1.Value += 1


Untested:

\\\
Me.ProgressBar1.Refresh()
///
Next

The standard progress control increments as expected. However, the smooth
progress control only updates at the end i.e. when the standard progress
control has reached its maximum.


--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Nov 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Daniel Pryde | last post by:
Hi there. I hope this isn't a stupid question to ask, but does anyone know how to print out a string without moving to a new line each time and simply updating the first line. An example would be,...
5
by: Claire | last post by:
My progress window is created by a secondary thread and then updated by it while a file is uploaded. There's an avi animation control on there that should show the move file avi. Plus a progress...
2
by: jayderk | last post by:
Hello All, I would like to have the progress bar look smooth not add the little progress boxes when you change the value? how about a custom image as the progress bar? regards Jay
0
by: Marc Miller | last post by:
KB Q323088 provided implementation of a smooth progress bar custom control in VB.NET. Works well. But, progress bars have an associated text in the background to reflect the percentage of...
8
by: Brian Henry | last post by:
I created a smooth progress bar with this code.. but if you update the values in a row quickly of it and watch it on screen it flickers... how would i change this to reduce the flickering?...
1
by: Manikandan | last post by:
Hi, I have a form with progress bar. I'm querying sql server with large number of records(around 1 lakh) for export The records are written to a text file I'm showing the process running by...
6
by: =?Utf-8?B?S2Fp?= | last post by:
Hi all, using AJAX Toolkit with vb.net 2.0 how could I make this "Updating..." Screen like e.g. on Codeplex when you click on the "Vote" button...
4
by: directory | last post by:
hey guys, I've got a weird one for ya....i have a form which takes user input in the form of textbox's etc. It then grabs some details from a file and updates some of the labels with some info...
1
by: K Viltersten | last post by:
> bar.PerformStep (); I noticed that there's a property for the bar stating what time it should take for the animation to move the fill to the requested spot. I'm guessing that's the time i...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.