Delphi - How to prevent Forms/MsgBoxes to move under prior form?
Posted
by durumdara
on Stack Overflow
See other posts from Stack Overflow
or by durumdara
Published on 2010-06-08T12:06:18Z
Indexed on
2010/06/08
12:12 UTC
Read the original article
Hit count: 274
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
© Stack Overflow or respective owner