title: Detect an application runs by user click or Windows startup in C#
body: <p>I've a C# WinForm application. Currently it runs from a desktop shortcut. But I would like to add it in system startup. User can decide whether it will run on startup or not.</p>
  
  <p>If it runs on system startup, I would like to minimize it on system tray, otherwise it will run on task-bar.</p>
  
  <p>Is there any way to check whether it is being launched on startup or not?</p>