Solved

Simple C++ Builder problem

Posted on 2002-03-26
4
181 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Errors will happen. It is a fact of life for the programmer. How and when errors are detected have a great impact on quality and cost of a product. It is better to detect errors at compile time, when possible and practical. Errors that make their wa…
  Included as part of the C++ Standard Template Library (STL) is a collection of generic containers. Each of these containers serves a different purpose and has different pros and cons. It is often difficult to decide which container to use and …
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.

691 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