You could do this.WindowState = WindowState.Minimized, which will minimize the form, but show it in the taskbar. By setting this.ShowInTaskbar to False, you'll get rid of the task, but it can still be gotten to via Alt-Tab.
The better way to do this would be to use a void Main() as a startup. Then, you can either just show the TrayIcon, or control what forms are shown.
|