I know the SEHException when calling ShowDialog is quite a common problem,
generally associated with EnableVisualStyles, but I've just been having a
problem with it, and I'd already added the DoEvents call before
Application.Run, so it wasn't that.
I'm working on an application which uses a timer to poll a database at
regular intervals. There is also an override button to force an immediate
check. When a dialog box was shown from the Timer control's Tick event, I
got the SEHException, but when it was shown from the manual override, I
didn't. Strange, thought I.
As an experiment, I replaced the System.Windows.Forms.Timer control with a
System.Timers.Timer object, and the problem went away.
I post this in the hope that it might help others in the future.
Cheers,
Mark