Beispiel #1
0
        // 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();
        }
        // 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();
        }