Discussion:
orphan windows
(too old to reply)
Stefano Agostinelli
2008-05-12 12:49:44 UTC
Permalink
Hello.
I developed an application (C++ Builder3) in which the Main window opens a new window with a progress bar to show the progress of a quite long computation.
After the computation ends this window is closed through the Hide() function. Everything seems to work ok, but I noticed that if during the computation the application looses the input focus the progress window is not closed at all!
Can someone kindly suggest some solution?
Thanks a lot
Stefano Agostinelli
Remy Lebeau (TeamB)
2008-05-12 17:02:49 UTC
Permalink
Post by Stefano Agostinelli
After the computation ends this window is closed through the Hide()
function.
Hide() does not close the window, only makes it invisible. To actually
close it, use Close() instead.
Post by Stefano Agostinelli
Everything seems to work ok, but I noticed that if during the computation
the application looses the input focus the progress window is not closed
at all!
Then you probably have your code set up incorrectly, such that Hide() is not
actually being called at all. Please show a snippet of your actual code to
demonstrate how you are actually using the progress window.


Gambit
Stefano Agostinelli
2008-05-16 16:27:50 UTC
Permalink
Post by Remy Lebeau (TeamB)
Post by Stefano Agostinelli
After the computation ends this window is closed through the Hide()
function.
Hide() does not close the window, only makes it invisible. To actually
close it, use Close() instead.
I tried Close() but it does not work the same way!
Post by Remy Lebeau (TeamB)
Post by Stefano Agostinelli
Everything seems to work ok, but I noticed that if during the computation
the application looses the input focus the progress window is not closed
at all!
Then you probably have your code set up incorrectly, such that Hide() is not
actually being called at all. Please show a snippet of your actual code to
demonstrate how you are actually using the progress window.
I've debugged the program and the Hide/Close() method is really called (and returns an ok value) but the window does not close!
It seems like the Application does not refresh the status of this window. Is this a bug of C++Builder3?
Thanks
Stefano
Remy Lebeau (TeamB)
2008-05-16 16:43:40 UTC
Permalink
Post by Stefano Agostinelli
I've debugged the program and the Hide/Close() method is really called
(and returns an ok value) but the window does not close!
Do you have an OnClose(Query) event handler assigned, by chance?


Gambit
Stefano Agostinelli
2008-06-09 07:11:59 UTC
Permalink
Post by Remy Lebeau (TeamB)
Post by Stefano Agostinelli
I've debugged the program and the Hide/Close() method is really called
(and returns an ok value) but the window does not close!
Do you have an OnClose(Query) event handler assigned, by chance?
No there's no OnClose event handler assigned. I think it could be a bug of C++ Builder. Any other suggestion please?
Thanks
Stefano

Loading...