开发者

How to prevent Delphi MainForm to show when a file dialog is showing?

开发者 https://www.devze.com 2023-03-04 17:46 出处:网络
My application has many forms, there is also one more important form, that is the main form, the behaviour is in general ok bu开发者_如何学编程t in same cases (for example when I open a file dialog fr

My application has many forms, there is also one more important form, that is the main form, the behaviour is in general ok bu开发者_如何学编程t in same cases (for example when I open a file dialog from a subform) the beahviour is: subform is hidden and mainform is shown.

How to avoid this?


Make sure you either implicitly or explicitly set the PopupParent of both the sub-form and the dialog. If you open both the sub-form and the dialog from some random bit of code somewhere and don't tell Windows about the correct Z-order, stacking issues can happen.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号