Solved

Simple C++ Builder problem

Posted on 2002-03-26
4
173 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

IntroductionThis article is the second in a three part article series on the Visual Studio 2008 Debugger.  It provides tips in setting and using breakpoints. If not familiar with this debugger, you can find a basic introduction in the EE article loc…
Many modern programming languages support the concept of a property -- a class member that combines characteristics of both a data member and a method.  These are sometimes called "smart fields" because you can add logic that is applied automaticall…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
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.

864 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now