Recently, I have worked on similar requirement and below is what I did.
1. First add your application to start up using below code
<pre lang="c#">
private void AddApplicationToStartUp()
{
RegistryKey reg = Registry.CurrentUser.OpenSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run", true);
reg.SetValue("Your App Name", Application.ExecutablePath.ToString());
}
2. Upon start up run application in background as below
public void RunFormInBackGround()
{
this.WindowState = FormWindowState.Minimized;
ShowInTaskbar = false;
this.Visible = false;
}
3. I'm executing methods mentioned in Point # 1 and 2 in form load event as below
private void frmBackground_Load(object sender, EventArgs e)
{
RunFormInBackGround();
AddApplicationToStartUp();
}
I hope above helps, for further queries / questions, do reply back.