When either hiding my tray icon and closing the application, half the time my application's tray icon gets 'stuck'. Meaning doesn't leave until you mess around in the tray area.
I know that to clean up during closing I can do trayIcon.Dispose()
but that only works for when i close my C# application, and not for when I hide (trayIcon.Visible = false
) it.
Does anyone know of a hack, or anyway at all, that can be used to refresh the tray area, or just make sure my icon actually stops displaying?