on 03-24-2006 7:58 PM
Hello All:
I am very new at this, and this problem is very strange. I created a menu which opens a form. However when I close the form and try to open the form again, the menu no longer work. I debugged and found the process is still running hoewver the event handler doesn't seem to pickup any new evens. I have three even handling, appevent, itemevent, menuevent. After the form close non of the event respond. But the process stil running. Has anyone also see this kind of problem? Thank You!
oh and my main function does have
System.Windows.Forms.Application.Run() repeating the run. if I don't open and close any form. This works great. But as soon as I close form all even stop handling. Doesn't it have something to do with different threas?
Message was edited by: Bo Peng
Hi Bo Peng
The reason for this happening is that somewhere along the way, somwhere where between opening the form, anything done on the form and closing it an error has occured. That is what causes this. Has all your code pieces got exception handling (try blocks). Put this around all your code and obviuosly display the error, see if any error occurs.
Another thing, is your events procedure headings written correctly??
Hope this helps
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Event handling and it's parameter is correct. I think, because it handles everything fine until the form got closed. But the try and catch thing is definitly sounds interesting. I will give it a try, there are just couple of things that I don't have try and catch for. But I will get it done to see if there are any unhandled exception out! Thank You!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
99 | |
11 | |
11 | |
6 | |
6 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.