What you are describing is good old fashioned "background processing" and the simplest way to do background processing is ... in the background! :)<div><br></div><div>i.e. use a *thread* to do the work.<div><br>
</div><div>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.</div>
<div><br></div><div>But ime, trying to "simulate" threading is often more problematic (and less robust) than just doing threading in the first place. :)</div><div><br></div><div>imho. ymmv. :)</div><div><br><br>
<div class="gmail_quote">On 20 September 2011 12:11, Robert Martin <span dir="ltr"><<a href="mailto:rob@chreos.co.nz">rob@chreos.co.nz</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hi<br>
<br>
I have a class that I want to display a message while it is processing.<br>
I want no user actions available while the processing occurs, the<br>
class will (always) remove the message on completion or failure. I want<br>
it to look pretty too !<br>
<br>
I wanted to pop up a modal form without the close buttons, however<br>
calling showmodal will pause the process and stop my class closing the<br>
screen. In the past I have gotten around this by putting the processing<br>
code on the message screen itself, this isn't practical in this case.<br>
<br>
The class is used in a number of places throughout my application.<br>
<br>
What do people recommend I do / use?<br>
<br>
Thanks<br>
Rob<br>
<br>
<br>
_______________________________________________<br>
NZ Borland Developers Group - Delphi mailing list<br>
Post: <a href="mailto:delphi@listserver.123.net.nz">delphi@listserver.123.net.nz</a><br>
Admin: <a href="http://delphi.org.nz/mailman/listinfo/delphi" target="_blank">http://delphi.org.nz/mailman/listinfo/delphi</a><br>
Unsubscribe: send an email to <a href="mailto:delphi-request@listserver.123.net.nz">delphi-request@listserver.123.net.nz</a> with Subject: unsubscribe<br>
</blockquote></div><br></div></div>