Several icons open in the tray panel

I am working on a Windows application, and when I launch this application, several icons appear on the tray panel:

and when I click on these icons, they disappear.

Does anyone know why this is happening?

protected override void OnClosed(EventArgs e) { try { notifyIcon1.Visible = false; notifyIcon1.Icon.Dispose(); notifyIcon1.Dispose(); } catch(Exception ex) { } base.OnClosed(e); Environment.Exit(0); } 
+1
source share
1 answer

Here's how I close the icon in the system tray to open the full application in a program that I wrote some time ago:

NOTE: this is well suited for an event handler in code, so this.Show () and this.Activate ()

  NotifyIcon sysTrayIcon = sender as NotifyIcon; sysTrayIcon.Visible = false; this.WindowState = WindowState.Normal; this.Show(); this.Activate(); 
+1
source

Source: https://habr.com/ru/post/957365/


All Articles