// Launch the thread that manages the notification tray icon private void setupTrayIcon() { var myThread = new Thread(delegate() { using (AppTrayIcon ati = new AppTrayIcon(this)) { ati.Display(); Application.Run(); } }); myThread.SetApartmentState(ApartmentState.STA); myThread.Start(); }