I\'ve got a small C# (.NET 4.0) Console Application that I\'d like the user to be able to interact by showing a menu when they right-click the System Tray icon. I can add an
Here is the solution:
You have to use Application.Run()
because events of gui in console mode not working.
But you can use this solution:
var task = System.Threading.Tasks.Task.Factory.StartNew(() => ShowTrayIcon());
void ShowTrayIcon()
{
some code with tray icon ...
}
This will start your setup of try icon in new thread ...