First, this is the C# forum. Your question has nothing to do with C#. You should have asked it in the web development forum.
You may want to consider a third party alternative.
I have a vewwy simple app which just sits in the system tray while doing its work. When a user double clicks the notification icon, a config window opens and you can edit some settings there. Right now, I have a simple form which will be hidden from the user and show a notification icon when formstate is set to minimized.
For some reason, this works under windows xp, in windows7 I have to disable the ShowInTaskbar call, as that causes a stack overflow in the current thread. If I don't use the call, the form is minimized and remains visible on the taskbar, annoying at best.
Any workarounds? (or am I doing something stupid here...?)
A good programmer is someone who always looks both ways before crossing a one-way street. (Doug Linder)
Your statement is suggesting this.ShowInTaskbar = false; is firing the Resize event again. If that is so, you can break the loop by using if (this.ShowInTaskbar) this.ShowInTaskbar = false; // avoid a Resize avalanche.
PS: Make sure to provide an appropriate comment to prevent someone from simplifying the code and reintroducing the problem.