Board index » delphi » Non-interactive Form Question

Non-interactive Form Question

I have an data processing app that needs to run, display a form,
execute a procedure and then exit once the procedure has completed.
I'm unable to find an event that occurs immediate after the form has
been created and made visible.  I currently have the form being
displayed and the procedure being executed from within the form
create, but this doesn't seem to allow the Close method to work
properly.  I'm pretty new at Delphi and any hints would be a great help.

Thanks!

-------------------==== Posted via Deja News ====-----------------------
      http://www.dejanews.com/     Search, Read, Post to Usenet

 

Re:Non-interactive Form Question


Quote
d...@asg.com wrote:

> I have an data processing app that needs to run, display a form,
> execute a procedure and then exit once the procedure has completed.
> I'm unable to find an event that occurs immediate after the form has
> been created and made visible.  I currently have the form being
> displayed and the procedure being executed from within the form
> create, but this doesn't seem to allow the Close method to work
> properly.  I'm pretty new at Delphi and any hints would be a great help.

> Thanks!

try this:

Declare variable FStarted in the private section of the form

In the OnActivate event:

if FStarted then exit;
FStarted := TRUE;
Application.ProcessMessages;
Do whatever...
Close;

Haven't tested it, standard disclaimer applies ;)

--
|----------------------------------------------------------------------------|
|Need a custom component? Late on a project? Could use an
util?              |
|DOS Device driver? A VxD? NT drivers or services? Applications of any
kind? |
|Low rates, fast
delivery!                                                   |
|----------------------------------------------------------------------------|
Erik Sperling Johansen <e...@info-pro.no>

Other Threads