Jump to content
  • Advertisement
Sign in to follow this  
one mind

[.net] Can a program detect if another program is running?

This topic is 4657 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, I am trying to find a way that my c# winform program can detect if another peice of software is running.I want my program to display when a certain program is active and to hide when its not. Any ideas would be great. Thanks :)

Share this post


Link to post
Share on other sites
Advertisement
Maybe you could check OS's process list from time to time?


System.Diagnostics.Process[] myProcesses = System.Diagnostics.Process.GetProcesses();

Console.WriteLine("ProcessName:ProcessID");

for (int i = 0; i < myProcesses.Length; i++)
{

string processName = myProcesses.ProcessName;

Console.WriteLine("{0}", processName);

}

Console.ReadLine();


Share this post


Link to post
Share on other sites

This topic is 4657 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Guest
This topic is now closed to further replies.
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!