Waiting form owner

E

esquif

I have a process that take some time to process data in formA.
While processing the data I wish to pop a "waitingform", simple form
with a label saying "Processing Data...". There is a timer within the
Waitingform, on each tick the label is hide and show to reflect that
the program is still running. When the processing finish, the waiting
form just close.

I have done everything and it's work well except for one thing.

If I set the waitingform owner :

WaitingForm->Owner = FormA

The waitingform doesn't appear before the data process finish, the form
disappear as soon as it appear. If I dont set the owner, the
waitingform works as expected, but can be lost behind other windows and
FormA look like if crash happen.

Does someone have an idea how I can set the ownership of the waiting
form and still keep the behavior i wish? Thank you
 
G

Guest

Rather than use a separate form, why not just put a label on the form thats
doing the work?
 
E

esquif

Since I use the WaitingForm at some other places in my code, I wish to
keep the same way of waiting.
 
K

Keith Wilby

esquif said:
I have a process that take some time to process data in formA.
While processing the data I wish to pop a "waitingform", simple form
with a label saying "Processing Data...". There is a timer within the
Waitingform, on each tick the label is hide and show to reflect that
the program is still running. When the processing finish, the waiting
form just close.

I have done everything and it's work well except for one thing.

If I set the waitingform owner :

WaitingForm->Owner = FormA

The waitingform doesn't appear before the data process finish, the form
disappear as soon as it appear. If I dont set the owner, the
waitingform works as expected, but can be lost behind other windows and
FormA look like if crash happen.

Does someone have an idea how I can set the ownership of the waiting
form and still keep the behavior i wish? Thank you

Why are you changing ownership of the form? The owner should be the
developer. If you want to force the focus to your waiting form whilst it's
open, set its modal property accordingly.

Regards,
Keith.
www.keithwilby.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top