I need my application to autostart, and yet stay in the background until needed.
Problem is that although I'm sending the application to the background at construction time, it then gets events that send it to the foreground.
My auto-start is currently implemented by an auxiliary process, which runs the application process by calling the RProcess API (Create and Resume).
I know the most elegant solution would be to create an exe to do the logic, and GUI which only runs on demand, but for the coming version I simply don't have the time to do the separation. Also, when the GUI is needed, I need to be able to launch it really quickly, so even if I had the time, I'd probably consider having the GUI switched on all the time (although in the background).