Delphi - How to prevent Forms/MsgBoxes to move under prior form?

后端 未结 4 639
刺人心
刺人心 2020-12-13 03:03

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.Sh         


        
4条回答
  •  悲&欢浪女
    2020-12-13 03:44

    I looked at this page and the FAQ for half an hour and still can't find how to post a comment, so forgive me for this breach of protocol.

    First of all I'd like to make clear that the poster, IMHO, is not using Windows 98. He writes "after Windows 98 era" which I understand means he is having this problem with Windows versions after 98.

    As I am having this problem too (CB2009), I'd like to emphasize the poster's question "Is it Windows bug?", which I have not seen answered. If it's a Delphi/Builder bug, maybe there is a way to avoid it? I can't see how intercepting all potential dialogs is a workable solution, nor avoid using fsStayOnTop. I have a settings form that needs to stay on top of my main form, but the settings form can and will popup dialogs that under certain conditions will disappear under the settings form.

    It would be very helpful if I would understand where the support of z-order goes wrong, as it may offer a clue on how to avoid it.

提交回复
热议问题