I have an issue where the parent form will minimize to the task tray (but I don't think it is loosing focus because the next form that shows, the Studio IDE, has focus ) when I close a dialog/form that was shown by calling ShowDialog(owner). The weird thing is that this doesn't happen every time. I don't see how the owner/parent parameter is getting cleared so I don't know why the parent would go away.
I can reproduce it every time.
The bug is not in WinForms, but in the windows API (I can just as easily reproduce it with C code).
Avoid triple-nested dialogs, that seems to be the primary trigger.
You can also refocus the correct form in OnClose.
Hi,
I have the same issue, which has been plaguing me for weeks!
I have placed logging calls at every event I can think of in the parent and child to try to capture the instant the parent is minimised, but I don't believe that any form event is called when the issue occurs.
I find that it not only happens when the child is closed, but also when the child makes a webservice call to perform some function.
Also, I don't believe it is limited to the .ShowDialog(owner) method of showing the child, but also to the .Show() method. My forms are regular C# or VB forms (not MDI).
Any offers?