[C#]Programm in Tray

11/18/2011 21:34 FreeCoder#1
Also will mein Programm in Tray schicken. Wenn Programm Minimiert wird.
Leider Funktioniert das noch nicht. Icon in Tray wird angezeigt aber Programm ist immer noch in der Taskleiste.
Hier mein Code:

Code:
        private void notifyIcon1_Click_1(object sender, System.EventArgs e)
        {
            this.ShowInTaskbar = true;
            this.notifyIcon1.Visible = false;
            this.WindowState = FormWindowState.Normal;
        }

        private void Form1_Resize(object sender, System.EventArgs e)
        {
            if (this.WindowState == FormWindowState.Minimized)
            {
                this.ShowInTaskbar = false;
                this.WindowState = FormWindowState.Minimized;
                this.notifyIcon1.Visible = true;
            }
        }
CLOSE hab selbst gelöst.