activating a process

  • Thread starter Thread starter Andrea V.F.
  • Start date Start date
A

Andrea V.F.

I want that only one instance of my application is running on the
machine. So i check with the Process.GetProcessesByName if there is
another instance of the application. If there is another instance I
exit the current instance, but before exiting I wold like to activate
the previously activated instance (like in winamp for example). How can
I do this??

Thanks for help.
 
I looked at the link you provided but from the subsequent e-mails, it appears
as if there is a problem with the code provided.

VB.net is complaining that 'ExecutingProcesses' isn't declared. I placed
the Dim and If Then statements in the Form's Load Event. It works if I
comment out
ShowWindow... and SetForegroundWindow... lines.
Should not the ExecutingProcesses be RunningProcesses?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top