in my code i need to run notification control without showing any form how can i do it? i just add this code to program.cs main thread but it’s not working please help me with this?
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run();
TaskbarIcon tb = new TaskbarIcon();
var balloon = new Warning();
tb.ShowCustomBalloon(balloon, PopupAnimation.Fade, 12000);
warning is a user control
I would recommend calling Application.Run() with an instance of ApplicationContext as parameter:
Programm.cs:
This way it works with the default .NET NotifyIcon.