Problem with 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". The waiting
form have it's own thread and show the process advancing between 0 and
100%.There is a timer within the
Waitingform, on each tick the progress percentage is read and display,
also this 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. I wish
the waiting form to be modal and own by the main form.

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 user may believe there is a problem when it's not.

I use multiple threads in my application. The data processing thread is
not the same as formA nor the same as the Waitingform.

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

esquif

I have already try the TopMost property.

But the problem stay the same as soon as I set the owner of the
waitingform, the waitingform refuse to show before the data have been
processed. TopMost or Not

It's like if something prevent the waitingform to appear. I look the
problem from every side I see and I don't find anything usefull yet.

Within the WaitingForm there is a timer and at every timer tick, the
waitingform read a share variable to know where the process is and to
redraw a progressbar. When there is an owner, the timer doesn't tick.
It's not the source of the problem, but I think it's part of it.

SL
 

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