Crash at Application.Run(Form)

  • Thread starter Thread starter Jeff
  • Start date Start date
J

Jeff

I've been working on an app that has the usual
Application.Run(new MyForm()) call in the static void Main
(). I can run this executable when I run it on my
development machine, but when I install everything on a
test machine, I get an unusual error in a message box:

(Title) MyApp.exe - Common Language Runtime Debugging
Services

(Body) Application has generated an exception that could
not be handled. It gives a process and thread id here
also, but I don't think those are too important.

I slipped in a message box before the call to
Application.Run() and it pops up. I also put in a message
box as the first line in the constructor of my form, but
the app never makes it there; it just gives me the crash
and message box.

I've searched high and low for an answer to this. I've
reinstalled the .NET framework, but that didn't work out.
Any help is appreciated.
 
I went a little bit further and found that it isn't
crashing in the Application.Run call. I put a different
form in my project, and I put it in the call to
Application.Run. This works until I create a new object
of the form I originally wanted to bring up. Does anybody
know why creating a Windows Form will cause an exception
to raise that can not be handled?

Thanks...
 
Back
Top