473,388 Members | 1,220 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,388 software developers and data experts.

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.
Mar 17 '10 #1

✓ answered by tlhintoq

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

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

4 1497
GaryTexmo
1,501 Expert 1GB
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!
Mar 17 '10 #2
tlhintoq
3,525 Expert 2GB
Sounds like you built a multi-threaded application but aren't closing all your threads.

Do you make new threads programmatically in your application? Do you make a point of closing them, or are you relying on Application.Exit() to do that for you?
Mar 17 '10 #3
jkmyoung
2,057 Expert 2GB
How are you 'running' the software? Is it by run mode, or debug mode inside the IDE?
Mar 17 '10 #4
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.
Mar 18 '10 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

7
by: sq1492 | last post by:
There are lots of talks about .Net going around. .Net is considered to be a RAD (rapid application development) framework so the question remains open whether it's useful for developing software...
6
by: Perico | last post by:
hi to all, If to start a process i can use this way... System.Diagnostics.Process.Start() How could close a proccess in my machine? there isnt a method like End() Thanks in advance.
3
by: Keith Grefski | last post by:
I cant seem to figure out how to terminate a process in vb.net i can do it using vbscript and wmi but terminate doesnt seem to exist in the available classes for wmi under vb.net
4
by: hvj | last post by:
I need to run a .NET1.1 program in a .NET2.0 CLR. The .NET1.1 exe starts correctly in .NET2.0. Now I want to debug in Visual Studio 2005. But when I try to open the .NET1.1 project, Visual Studio...
0
by: Scheu | last post by:
Hi all, I'm hoping someone can help me with this bizarre problem. If I create a new PerformanceCounter object in a ComVisible class and invoke it from wscript, it never seems to terminate. When...
0
by: ToadLurker | last post by:
Usually, to debug my .NET dll, I typically just run my web application until the DLL in question is invoked - at which point I can just attach to it via Visual Studio .Net, and debug it. Two weeks...
2
by: cnsabar | last post by:
Hi., I am using the following code to terminate the any process by giving the process name as input... use Win32::Process::List; use Win32::OLE; $Win32::OLE::Warn = 3; $P =...
1
by: sri6412 | last post by:
I am trying to get the user details from the database, the request handler is in execution, but mean while i would like to verify the timeout value. Once request processing reached timeout value,...
5
by: david | last post by:
I'm developing a program that runs using an asyncore loop. Right now I can adequately terminate it using Control-C, but as things get refined I need a better way to stop it. I've developed...
6
by: GaryDean | last post by:
I see some references on debugging by attaching to a process. There are MSDN articles that show how to attach to a process for debugging. However, I can find no info on how exactly to get the...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.