I had a problem in .net compact 3.5 where my dialog closed immediately after being shown with .ShowDialog(). Then I found a workaround to call it twice. It helped, but I have no idea why. I mean why would executing the same operation twice would work any different, while the constructor code is only called once anyway.?
try
{
//blinks the form (closes immediately)
_activeChildView.ShowDialog();
//shows dialog and blocks the thread until dialog is closed (woks as intended)
_activeChildView.ShowDialog();
}
catch( Exception ex)
{
//no exception is ever caught there
}
The first dialog result is DialogResult.None and the Closing event isn't called after the first showDialog.