Well Dark_Omen, your in luck i have been recently been working on the same thing myself for my program, only that i wanted the main program to go directly to tray when i minimised it and disapear from tray when i cliked on icon in tray. Anywho it works fine with me. Probably you might want to look into the background thing with a more experienced programmer, but here is what i've done.
First put a notify icon tool on the form you want to be in tray and program like so
in Windows Form designer put this code in the notifyicon section
this.notifyIcon1.Click += new System.EventHandler(this.notifyIcon1_Click);
then put in lines of code this:
private void notifyIcon1_Click(object sender, EventArgs e)
{
if (this.WindowState == FormWindowState.Minimized)
this.Show();
this.WindowState = FormWindowState.Normal;
this.Activate();
notifyIcon1.Visible=false; //if you want to remove from tray when clicked on
}
then enter this code in Form_Load to prevent the form from showing and tay in tray
private void Form1_Load(object sender, System.EventArgs e)
{
this.Hide();
notifyIcon1.Visible=true;
}
but also make sure you have this in the Windows Form design in the Form area or just change properties to Window State to minimized
this.WindowState = System.Windows.Forms.FormWindowState.Minimized;
I hope this helps you out!
And write back if you cant get it to work
Happy coding!