I was using this single instance implementation:
http://sanity-free.org/143/csharp_dotnet_single_instance_application.html
However, It stopped working when I added a NotifyIcon and I set ShowInTaskbar = false when the window is minimized. In this state the windows doesn't get the broadcast event.
So I changed the code to find the window using EnumWindows and matching the window title, which is a flimsy solution. I tried SetProp, GetProp, but the window handled is recreated when the value in ShowInTaskbar changes. I'm in .net core so I can't use the visual basic class WindowsFormsApplicationBase.
Is there a better good simple solution for activating the first window? Hopefully without sockets, pipes and stuff like that?