I am currently working on a c# wpf project. I have added code to the program so that it creates a registry key to start the program automatically at user logon and have also written the program so that it can minimise to the system tray.
When the user launches the program themselves manually I obviously want the program to appear in the middle of the screen like normal but when the program launches automatically at startup I want it to load up minimised.
Is there a way to determine if the program was launched by the user or launched at startup so that I can make it load minimised instead of appearing on the screen at startup.