Skip to Content
author's profile photo Former Member
Former Member

When Form Closes APP stop processing

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

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Best Answer
    Posted on Mar 25, 2006 at 05:42 AM

    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 😊

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Mar 25, 2006 at 12:46 PM

    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!

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.