Herfried K. Wagner [MVP] wrote:
* "Fred Gravel" <fg*****@lethbridge.ca> scripsit: I have a Windows app that I have installed on 3 client machines (all >>> win2k) thatreturn an un-handled error message when starting
up. >
I have placed 'Try/Catch/Finally' blocks in the 'sub main' and it
doesn't even get to there. Problem is the application works fine on >>> my development PC.
See Jay B. Harlow's explanation:
<url
http://groups.google.de/groups?selm=...K2MSFTNGP10.ph x.gbl>
Did you add a handler to 'Application.ThreadException'? If this
doesn't work, then there must be sonething wrong with your
system/.NET Framework installation.
Actually I had added a handler to the 'Application.ThreadException' in
the 'sub main' but the app was still throwing 'Unhandled exceptions".
The problem was in WHERE my 'sub main' was. I had my sub main buried in
a module (old style) rather than as a 'shared sub main' in the main
application form. Once I moved it to the main form, a more definitive
error was produced along with the stack trace, thanks to Jay's example,
and I believe I'm on the track to finding out what is causing the issue.
Thanx for the direction