I want to minimize my app to the tray if it was opened on start up.
But if it was opened manually it should be in taskbar
I use this code to run my app on start up
Microsoft.Win32.RegistryKey key = Microsoft.Win32.Registry.CurrentUser.OpenSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run", true);
key.SetValue("Your Application Name", Application.ExecutablePath);
Please don't flag this question if it was a dumb question because i'm a new to c#