Peteperson Posted January 30, 2007 Posted January 30, 2007 (edited) Guys, I have a terrible problem. I had an windows application (dot net 1) which was controling some tellers... Anyway, when I tried to upgrade to dot net 2, at a certain point where I just open a new messagebox the application ends so violently, that I can almost hear it. I think that the problem appears because this teller does what it does in a new thread. So, a thread accesses a control not created by it and this is something that the new dot net does not accept it. Either this or dot net 2 does not allow other threads playing with UI. I must also tell you that the error appears only when running the release version in win2000. Heeeeeeeeeeeeeeeelp. Edited January 30, 2007 by Peteperson Quote
Peteperson Posted January 30, 2007 Author Posted January 30, 2007 The problem is that I receive no error... There are many try catch blocks which are simply bypassed !! The application just dies asking me to send or not the message to Microsoft... when I deploy the debug version everything works fine!! Do you know any differences between the two versions of .Net that could explain this behaviour ? I tried many things: invoke(), beginInvoke, CheckForIllegalCrossThreadCalls = false, but nothing worked. I'm desperate... Quote
Administrators PlausiblyDamp Posted January 30, 2007 Administrators Posted January 30, 2007 You never should be manipulating the UI from anything other than the main UI thread - it was just that .Net 1 / 1.1 didn't enforce this rule; this however could lead to hard to track down problems at runtime so .Net 2 detects and traps this violation. http://www.xtremedotnettalk.com/showthread.php?t=95171 might shed some light on how to do this correctly. Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.