473,545 Members | 2,715 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.Mi nimum = 0
ProgressBar1.Ma ximum = 11
ProgressBar1.Va lue = 0
MySmoothProgres sBar1.Minimum = 0
MySmoothProgres sBar1.Maximum = 11
MySmoothProgres sBar1.Value = 0

For i As Integer = 0 To 10
For j As Integer = 0 To 100000000
'Do Nothing
Next
MySmoothProgres sBar1.Value += 1
ProgressBar1.Va lue += 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 1627
"Geoff Jones" <no********@ema il.com> schrieb:
For i As Integer = 0 To 10
For j As Integer = 0 To 100000000
'Do Nothing
Next
MySmoothProgres sBar1.Value += 1
ProgressBar1.Va lue += 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(u pdateRect)

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

SmoothProgressB ar1.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******** ******@TK2MSFTN GP11.phx.gbl...
"Geoff Jones" <no********@ema il.com> schrieb:
For i As Integer = 0 To 10
For j As Integer = 0 To 100000000
'Do Nothing
Next
MySmoothProgres sBar1.Value += 1
ProgressBar1.Va lue += 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
4095
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, if I wanted to have a percentage progress counter that was constantly updating. I'm unsure how to do this without printing to a brand new line. Any...
5
2184
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 bar. Im having problems as the screen isn't being redrawn properly. If I call DoEvents each time then it works ok. I want to dump DoEvents to prevent...
2
4085
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
1157
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 processing, i.e., 10%, 12%, 95% etc. Need help in how to add text to the control
8
5185
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? thanks... Imports System Imports System.Drawing Imports System.Drawing.Drawing2D
1
4163
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 updating the progress bar If the form loses focus(i.e selecting any other application) means progress bar is not updating The coding is below
6
2643
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 http://www.codeplex.com/AtlasControlToolkit/WorkItem/View.aspx?WorkItemId=9124 ? So the whole screen becomes inactive and a small window says "Updating..." so the user knows that something is going...
4
7604
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 like numbers etc. Anyway, i'm just updating the field properties like lblnumber.Text = variable1; Now the weird thing is that...when i run the...
1
5789
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 should delay my text updating by. Correct? When you mentioned a delay - is there an other way to do it than threads? I've found this solution.
0
7499
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7432
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
1
7456
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6022
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5359
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3470
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1919
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1044
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
743
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.