Tuesday, July 29, 2008

Keeping a Nonmodal form on top of App, but not on top of Everything

It took me a while to figure this one out, but the solution is pretty simple.

I want to keep a nonmodal form on top of my main app form. I have tried using:

Dlg.TopMost = True

in the nonmodal form (Dlg), but this approach keeps the form on top of everything, not just my main app form.

The solution is:

Dlg.Owner = Me ' Me is the main app form
Dlg.TopMost = False



More info can be found at:

http://www.syncfusion.com/faq/windowsforms/faq_c95c.aspx#q975q

No comments: