Suppose a main form A and a modal dialog B.
I launch B from a thread (using invoke) as a modal dialog. The dialog is correctly shown and it is launched using ShowDialog(parent), where parent is form A.
When I close B, the main dialog A is not responding properly to some events, such as mouse clicks. This issue is only reproduced under the following circumstances:
Once I close the dialog, the following symptoms occur:
StartPosition=CenterParent
, are not centered, they are shown in the top left corner on the screen.I was unable to reproduce the problem in other machine. Also, If I compile the code using .NET 2.0 or higher, the problem is not reproduced.
Any suggestion to solve this issue? I need 1.1 for my application. Any call I could perform to restore the event queue?
Thanks in advance.
Ok finally it was a threading issue. I changed the calling code outside of a thread and it worked.
It is quite annoying because sometimes we need to show this dialog from a thread, but in the case of .NET 1.1 and x64 machines it seems to have some troubles with invokes and multi threading.
In any case, if the code is compiled with .NET 2.0 or higher (so works in real x64), the problem is gone.