Solved

Simple C++ Builder problem

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

Technology Partners: 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

Suggested Solutions

Title # Comments Views Activity
computer science syllabus 3 103
White board coding practice 3 95
Beginner to Unreal Engine 4 5 107
Indy 10 not Receiving UDP broadcast 3 43
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…
Unlike C#, C++ doesn't have native support for sealing classes (so they cannot be sub-classed). At the cost of a virtual base class pointer it is possible to implement a pseudo sealing mechanism The trick is to virtually inherit from a base class…
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 pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.

730 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