What you are describing is good old fashioned "background processing" and
the simplest way to do background processing is ... in the background!  :)

i.e. use a *thread* to do the work.

Once you have the work being performed in a thread there are any number of
ways of skinning the cat by which your UI can present progress/completion
information and detect/be informed when your thread has done it's work.
 Depending on the specific circumstances in your case you might get away
with a simple OnTerminate event notification or you might need something a
little more sophisticated involving a TEvent (in SyncObjs).  Or some other
mechanism.

But ime, trying to "simulate" threading is often more problematic (and less
robust) than just doing threading in the first place.  :)

imho.  ymmv.  :)


On 20 September 2011 12:11, Robert Martin <[email protected]> wrote:

> Hi
>
> I have a class that I want to display a message while it is processing.
>  I want no user actions available while the processing occurs, the
> class will (always) remove the message on completion or failure.  I want
> it to look pretty too !
>
> I wanted to pop up a modal form without the close buttons, however
> calling showmodal will pause the process and stop my class closing the
> screen.  In the past I have gotten around this by putting the processing
> code on the message screen itself, this isn't practical in this case.
>
> The class is used in a number of places throughout my application.
>
> What do people recommend I do / use?
>
> Thanks
> Rob
>
>
> _______________________________________________
> NZ Borland Developers Group - Delphi mailing list
> Post: [email protected]
> Admin: http://delphi.org.nz/mailman/listinfo/delphi
> Unsubscribe: send an email to [email protected] with
> Subject: unsubscribe
>
_______________________________________________
NZ Borland Developers Group - Delphi mailing list
Post: [email protected]
Admin: http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email to [email protected] with 
Subject: unsubscribe

Reply via email to