Good Day!
Using PB 2017 R3
I am employing a shared object NVO for a window wherein I display the status of a long-running process. Everything works, beautifully, and the application never freezes because of this approach.
The issue, however, is that the window opened by the shared NVO never goes out of focus, even if I switch to another application. Here's why...
In order for my status window to stay on top, I am using SetPosition( TopMost! ). If I do not, then when I switch from my app to another then back to my app, my status window is lost forever. I have tried setting an instance variable in my NVO and then setting SetPosition( TopMost! ) and SetPosition( NoTopMost! ), WindowState = Normal! and WindowState = Minimized!, accordingly.
My biggest problem is getting a way to know when my application is minimized or the user switches to another application.
I have tried all of the following in my MDI frame and my parent sheet (as appropriate):
- pbm_mdiactivate
- activate
- deactivate
- resize
Bottom line, I cannot figure out a way to know when my PowerBuilder application is not what the user is currently viewing. Is there a way to catch when the user minimizes my application or switches to another application? Again, none of the events listed above seem to work for me.
Thanks,
Tom