> From: "Rainer von Saleski" <[EMAIL PROTECTED]>
> Subject: Re: Delphi Digest, Vol 35, Issue 7
> To: <[email protected]>
> Message-ID: <[EMAIL PROTECTED]>
> Content-Type: text/plain; format=flowed; charset="iso-8859-1";
>       reply-type=original
>
> Frustration!
>
> I want to display progress information (more than a progress bar)
> during a
> compute-bound process.  So I tried labels and changed their
> captions ... but
> Delphi never displays the changes.  So I tried calling form.Paint ... but
> this doesn't work either; it acts like a no-op.  Nor does setting
> form.visible false and then true.
>
> The *only* thing I have bumped into that semi-works is to use an edit box
> and setting the focus to it ... but that looks dreadful.  Even if
> I remove
> the focus right away, Delphi leaves the blue highlight on the text.
>
> So ... HOW do I convince Delphi to please refresh my screen display
> completely?
>
> Thanks,
> Rainer

Paint and all similar merely post a window paint needed value - Windows
won't send a refresh message until your process rests or finishes.
The best way is to run your process in a thread that sends an update message
to your main thread from time to time.
Otherwise - Application.ProcessMessages lets your process handle any pending
win messages.

Its a real kludge - and I use it a lot :)

Mick

_______________________________________________
Delphi mailing list -> [email protected]
http://www.elists.org/mailman/listinfo/delphi

Reply via email to