0

I'm creating an application that should always be running in the system tray. This is working like a charm.

now when I open the application for a second time, i have used the Mutex method and now also the Process.getprocessesbyname method. im able to find if there is already an instance running. im killing that process and start a new one. this is oke, but when I check the systemtray the old icons stay...

is there a way to find the running application and if it is running just show the form from that application instead of the new form.

when you now close the application with the X its not in the taskbar anymore only in the systemtray.

thx !

Bauke
  • 35
  • 1
  • 9
  • There is no way. Unfortunately. – Yaugen Vlasau Nov 17 '17 at 13:18
  • if I look at teamviewer, that is also a systemtray. and when you start it again the teamviewer windows opens.. – Bauke Nov 17 '17 at 13:20
  • not sure if I am misunderstanding, but there is a Make single instance application option https://stackoverflow.com/a/14105582/1383168 – Slai Nov 17 '17 at 13:26
  • thx. that is indeed what im looking for. but im using VS2017 and the option "Make single instance application" is not there at all. is this option moved ? – Bauke Nov 17 '17 at 13:49
  • seems like it's for VB projects only, but you can try https://stackoverflow.com/questions/6486195/ensuring-only-one-application-instance – Slai Nov 17 '17 at 14:07
  • Possible duplicate of [What is the correct way to create a single-instance application?](https://stackoverflow.com/questions/19147/what-is-the-correct-way-to-create-a-single-instance-application) – stuartd Nov 17 '17 at 14:16

0 Answers0