How to terminate the process which has been developed using Visual Studio?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • santusapi
    New Member
    • Mar 2010
    • 26

    How to terminate the process which has been developed using Visual Studio?

    Hello,
    I've developed a product using Visual Studio with C# .Net. And i built it by using build option. Now if i run the software and while exiting, if i close all the forms also, the process will be running. I've to stop the process by going into task manager. If i run the software again, another process will start running. Please can anyone help me how to solve this problem? It should terminate the process immediately after i close all the forms which are opened.
  • GaryTexmo
    Recognized Expert Top Contributor
    • Jul 2009
    • 1501

    #2
    It sounds like you're not terminating your program properly. Can you please describe in more detail what you're doing when you think you're closing the problem? (ie, are you clicking the X on the window, are you using a file menu, are you doing something else?)

    If there's any small snippets of code you could supply that go with the above, it may help also. No need for your full source, just any code that you are using that you expect to terminate your program.

    Thanks!

    Comment

    • tlhintoq
      Recognized Expert Specialist
      • Mar 2008
      • 3532

      #3
      Sounds like you built a multi-threaded application but aren't closing all your threads.

      Do you make new threads programmaticall y in your application? Do you make a point of closing them, or are you relying on Application.Exi t() to do that for you?

      Comment

      • jkmyoung
        Recognized Expert Top Contributor
        • Mar 2006
        • 2057

        #4
        How are you 'running' the software? Is it by run mode, or debug mode inside the IDE?

        Comment

        • santusapi
          New Member
          • Mar 2010
          • 26

          #5
          Thank You to all.

          Thank You GaryTexmo, tlhintoq, and jkmyoung. I got the mistake that i've done. From Gary Texmo, I got some idea of my mistake and from jkmyoung, I confirmed it. I was not closing all my threads. One was running. Thanks a lot.

          Comment

          Working...