Jump to content
Xtreme .Net Talk

Recommended Posts

Posted (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 by Peteperson
Posted
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...
  • Administrators
Posted

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.

Posting Guidelines FAQ Post Formatting

 

Intellectuals solve problems; geniuses prevent them.

-- Albert Einstein

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...