Delphi - How to prevent Forms/MsgBoxes to move under prior form?
- by durumdara
Hi!
Many times we experienced after Windows 98 era that some dialogs are lost their Z-Order, and moved back to prior form.
For example:
Dialog1.ShowModal;
Dialog1.OnClickButton() : ShowMessage('anything');
When MessageBox appears, sometimes not got focus, it is moved under Dialog1.
The users confused on it, because they are say: application freezed!!!
But if they are uses AltTab to move another app and back, the focus return to the MessageBox, and it will be the foreground Window.
We experienced this with ShowMessage, MessageBox, normal forms, QuickReport forms also.
Is anyone knows about this? Is it Windows bug? How to prevent it? How to catch this?
Thanks for your help:
dd