I am currently working on a C # wpf project. I added code to the program to create a registry key to automatically run the program when I logged in, as well as write the program so that it can minimize the system tray.
When a user launches a program manually manually, I obviously want the program to appear in the middle of the screen, as usual, but when the program starts automatically at startup, I want it to be minimized.
Is there a way to determine if the program was launched by the user or started at startup, so that I can minimize the load, and not appear on the screen at startup.
source share