Re: Question about application speed.

Giganews Newsgroups
Subject: Re: Question about application speed.
Posted by:  Remy Lebeau (TeamB) (
Date: Tue, 11 Nov 2003

"bluewolf" <bluewo…> wrote in message

> My program does a for then loop and while in that loop it goes
> so fast it doesn't update the screen with the status of scanning.
> I was wondering if there is something I could do to slow down
> the processing so the screen can be updatted.

Call the global TApplication::ProcessMessages() method inside the loop.

> Anyhow, in pascal you can do a Delay(??);, which was the cause
> of the runtime 200 issue.. and in Visual Pascal you can do Sleep(??);.
> I have typed in Sleep in the IDE of delphi and pressed Ctrl-F1 to
> see if it would pop anything for it, but it didn't.

Sleep() is a Win32 API function, not a Delphi/VCL function.  All it will do
is slow down the loop, but it will not allow the window to update itself.
You need to process pending messages for that.

> Also, any good examples of using TListView as a vsReport.. How
> to add data to the different field and sub fields.

Look at the TListItem::Caption and TListItem::SubItems properties.



In response to

Question about application speed. posted by bluewolf on Tue, 11 Nov 2003