Here is my problem.
I have a main application and open a modal dialog1, at this moment the main application window is disabled, and they all focus on the new dialog1.
In this dialog box1 I open another modal dialog2. So, now the main screen and dialog1 are disabled, and this dialog2 has all the focus. Absolutely still.
Now, when I close this top dialog2, I would expect it to just return to dialog1. It focuses on dialog1, but now the main application is turned on, and you can click anywhere that sends dialog1 behind, but leaves it open. This causes problems 1% of the time when the user does not immediately close the dialog box1 and starts clicking. As you can imagine, QA doesn't like it: o)
Windows seems a bit confused because the main application seems to know that dialog1 is still open, since the button on the ribbon still works.
Any ideas?
The best I've managed to do so far is to explicitly set:
dialog1.PopupMode := pmExplicit; dialog1.PopupParent := MainFrm;
It seems that when you close the dialog2, even if you click on the main application, you will see the ontop dialog of the main application. Thus, this will prompt the user to close it, but not 100% correctly.
Edit: I have since created a stand-alone application, and it functions as expected. When you close the windows, control and focus return from dialog2 to dialog1, and then to the main application when dialog1 is close. Offers something else in our tape code that I cannot find. Um!