473,386 Members | 1,821 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,386 software developers and data experts.

Annoying but probably easily solved loop question

Hi there folks...

Just wondering if someone can help a newbie to VB!?

I'm running some stuff in a For loop. Each time the loop runs it makes
a change to a value which it should display in a label. My problem is
that when I run the loop, say 100 times, the label only shows the
100th change. It doesn't update the label every time the change has
been made! I realise that what I want the VB to do sounds pointless in
that the label would change so fast that it wouldnt be readable... BUT
once I get this working I intend to make the label a coloured box that
doesnt show the value, but a colour indicating the range that the
value is in. By my reckoning, the way I have it now would make it only
show the colour of the last value updated before the loop exited.

Any help would be gratefully recieved.

John
Jul 17 '05 #1
2 3079
Add Label.Refresh after you set Label's caption a new text.

Screen refreshing is a resource-hangry process and the OS (Windows) gives it
low CPU priority unless your code demands it (Label.Refresh).

"John" <jo********@yahoo.com> wrote in message
news:b2**************************@posting.google.c om...
Hi there folks...

Just wondering if someone can help a newbie to VB!?

I'm running some stuff in a For loop. Each time the loop runs it makes
a change to a value which it should display in a label. My problem is
that when I run the loop, say 100 times, the label only shows the
100th change. It doesn't update the label every time the change has
been made! I realise that what I want the VB to do sounds pointless in
that the label would change so fast that it wouldnt be readable... BUT
once I get this working I intend to make the label a coloured box that
doesnt show the value, but a colour indicating the range that the
value is in. By my reckoning, the way I have it now would make it only
show the colour of the last value updated before the loop exited.

Any help would be gratefully recieved.

John

Jul 17 '05 #2
On 24 Nov 2003 10:41:39 -0800, jo********@yahoo.com (John) wrote:
Hi there folks...

Just wondering if someone can help a newbie to VB!?

I'm running some stuff in a For loop. Each time the loop runs it makes
a change to a value which it should display in a label. My problem is
that when I run the loop, say 100 times, the label only shows the
100th change. It doesn't update the label every time the change has
been made! I realise that what I want the VB to do sounds pointless in
that the label would change so fast that it wouldnt be readable... BUT
once I get this working I intend to make the label a coloured box that
doesnt show the value, but a colour indicating the range that the
value is in. By my reckoning, the way I have it now would make it only
show the colour of the last value updated before the loop exited.

Any help would be gratefully recieved.


Label1.Refresh
Jul 17 '05 #3

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

Similar topics

45
by: Jordan Rastrick | last post by:
Can anybody please give me a decent justification for this: class A(object): def __init__(self, a): self.a = a def __eq__(self, other): return self.a == other.a s = A(3)
2
by: Bo | last post by:
Hi, thanks for everyone's help and flames. I think I solved the prob but was surprised that no one noticed. Problem: Given this expression, a, b never increase under my compiler. double...
10
by: Douglas Buchanan | last post by:
I am using the following code instead of a very lengthly select case statement. (I have a lot of lookup tables in a settings form that are selected from a ListBox. The data adapters are given a...
15
by: 50295 | last post by:
Hi everyone, This one is better experienced than explained, so I'm including a code sample below. Please and save (as an html file) and view with NN or Firefox (or maybe even Mozilla), and then...
3
by: Rob Meade | last post by:
Hi all, I have a login page which has username and password fields, a login button, and 2 validation controls (one for each field) - currently I have controls to display to the summary if the...
8
by: K. Shier | last post by:
when i have the following code inside the .vb file that defines 'Public MustInherit Class frmDataEntry', if i try to open a derived form based on frmDataEntry, i get an error "Could not find any...
1
by: petdoc | last post by:
Hi Folks, I am trying to find the most perplexing bug I have had in a vb.net app to date. Here is some code: Dim Data as Short Data = Me.ReadPMAPDigits(pmOffsets.APIAS)
6
by: per9000 | last post by:
An interesting/annoying problem. I created a small example to provoke an exception I keep getting. Basically I have a C-struct (Container) with a function-pointer in it. I perform repeated calls...
5
by: josh001 | last post by:
This Error message pops up every time I run my program using Python Shell and won't open at all when I don't use Shell. Traceback (most recent call last): File "C:\Documents and...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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: 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:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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...

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.