• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 207
  • Last Modified:

Simple C++ Builder problem

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
Ber
Asked:
Ber
  • 2
1 Solution
 
jonninCommented:
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
 
DrDelphiCommented:
put Application->ProcessMessages() inside your loop.


Good luck!!
0
 
BerAuthor Commented:
Dr Delphi,
     Worked Perfectly

Cheers...
Ber...
0
 
DrDelphiCommented:
Cheers.
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now