Delphi - How to prevent Forms/MsgBoxes to move under prior form?
问题 Many times after the Windows 98 era we have experienced that some dialogs lose their Z-Order and move back to the prior form. For example: Dialog1.ShowModal; Dialog1.OnClickButton() : ShowMessage('anything'); When MessageBox appears, it sometimes doesn't have focus and is moved under Dialog1. The users are confused about it, they say: My application froze!!! But if they use Alt+Tab to move to another app and back, the focus returns to the MessageBox and it will be the foreground window. We