Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Handling windows-events, repainting form 1

Status
Not open for further replies.

BasSchouten

IS-IT--Management
Jul 31, 2001
33
NL
Hello all,

I'm looking for a Delphi 4 statement like the DoEvents statement in Visual Basic. It is used to handle all outstanding windows-events, so during long procedures you can keep the painted form up to date on the screen.

Specifically ... im setting a label.caption during an lengthy export process to inform the user of the progress, but i don't see then changes in the form.

Does anybody know the Delphi equivalent of DoEvents?

Thanks Bas Schouten
System Development & Webdesign
CBIS BV Holland
logo.gif
 
You can call a Component/Control or Forms 'update' procedure to force windows to refresh it.
have a look at 'Update' , 'Refresh' & 'Repaint' in the online help.
Also check out the function of 'application.processmessages'
this will help you keep some control during long (or possibly non terminating) loops.

Hope this helps Steve.
 
The Application.ProcessMessages did the trick!!

thanks a million Bas Schouten
System Development & Webdesign
CBIS BV Holland
logo.gif
 
Try to put a TTimer component and combine it with a Tprogressbar, you also can incorporate the updating of the label.

Regards S. van Els
SAvanEls@cq-link.sr
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top