Solved

Simple C++ Builder problem

Posted on 2002-03-26
4
176 Views
Last Modified: 2010-04-02
Hi, I am working in C++ Builder Version 4. I am trying to make a label visible at run time but it is before a big loop (for statement) and the program will not display the label as visible until it is finished the loop.
anyone have any ideas why this is happening and any idea how to fix it
Cheers...

0
Comment
Question by:Ber
  • 2
4 Comments
 
LVL 2

Expert Comment

by:jonnin
ID: 6896636
windows will not update the window unless forced or idle.
force an update/redraw etc before the loop. In the loop will really slow you down, but if the loop has a very long execution time, try refresh every n iterations or something.  I don't know off the top of my head what borland's refesh is...

0
 
LVL 6

Accepted Solution

by:
DrDelphi earned 200 total points
ID: 6896887
put Application->ProcessMessages() inside your loop.


Good luck!!
0
 
LVL 2

Author Comment

by:Ber
ID: 6896924
Dr Delphi,
     Worked Perfectly

Cheers...
Ber...
0
 
LVL 6

Expert Comment

by:DrDelphi
ID: 6896987
Cheers.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Written by John Humphreys C++ Threading and the POSIX Library This article will cover the basic information that you need to know in order to make use of the POSIX threading library available for C and C++ on UNIX and most Linux systems.   [s…
What is C++ STL?: STL stands for Standard Template Library and is a part of standard C++ libraries. It contains many useful data structures (containers) and algorithms, which can spare you a lot of the time. Today we will look at the STL Vector. …
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

792 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question