I have two forms for my application, that are visible in the Windows taskbar. When a modal dialog is popped up on the main form, the secondary form is locked. However, when the user clicks on the secondary form on the taskbar, it appears over the modal dialog box, and is basically frozen.
Is there a way to ensure that the modal dialog box does not draw underneath the secondary form? The topmost property is no good, since this draws on top of everything, even stuff not related to the application.
Your problem may be that you haven’t specified an owner for the dialog:
In your case, it would appear that you need to set the owner window for the dialog. That would prevent the window that is presenting the dialog from appearing over it.
EDIT Should have cited my source: .NET Windows Forms in a Nutshell. Also, I omitted the VB.NET code. I have appropriately flogged myself, but don’t feel like wading through the PDF file to track it down.