You don't want to make the application window the popup parent. Then your dialog can appear behind the main form. You want the main form to be the popup parent. Which you can do in CreateParams, or by setting PopupParent.   It's important that you understand what popup parent aka Window owner in Windows terminology means. At the moment you seem to be trying stuff without understanding it.    I think I already explained that destroying the window is the key to getting the behaviour you want. I gave you two options for doing that. 
    • Like
    2