Main form with always-on-top flag + dialog
-
Hello! I got a main form, which can set to be always-on-top (this is achieved using the
TopMost
property of the main form). The problem now is that when opening a modal dialog box, the dialog appears behind the main window. The brute-force solution would be to disable the always-on-top mode while displaying the dialog. A better solution would be to tell the dialog somehow that its parent is the main form and therefore to appear in front of it. I tried setting theOwner
,Parent
andParentForm
properties of the dialog, but nothing worked (Owner: doesn't do anything, Parent: not allowed for top-level controls, ParentForm: read-only property). Any solution? How can the dialog displayed in front of the main window? Thanks and best regards Dominik
Too many passwords to remember? Try KeePass Password Safe!
-
Hello! I got a main form, which can set to be always-on-top (this is achieved using the
TopMost
property of the main form). The problem now is that when opening a modal dialog box, the dialog appears behind the main window. The brute-force solution would be to disable the always-on-top mode while displaying the dialog. A better solution would be to tell the dialog somehow that its parent is the main form and therefore to appear in front of it. I tried setting theOwner
,Parent
andParentForm
properties of the dialog, but nothing worked (Owner: doesn't do anything, Parent: not allowed for top-level controls, ParentForm: read-only property). Any solution? How can the dialog displayed in front of the main window? Thanks and best regards Dominik
Too many passwords to remember? Try KeePass Password Safe!
Did you try also enabling the
TopMost
property of the dialog.
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook
-
Did you try also enabling the
TopMost
property of the dialog.
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook
No, didn't try that :-O Works great, thank you!
Too many passwords to remember? Try KeePass Password Safe!
-
No, didn't try that :-O Works great, thank you!
Too many passwords to remember? Try KeePass Password Safe!
Glad to hear my guess was right :)
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook