Reputation: 25
I stuck on WPF popup notifyicon in taskbar,it does not show the popup notification on the screen. Am tried the below code in c#
public void report()
{
//Here am selected the value from database and stored it in "str" ,upto
//this working fine
string title = "Report Received";
string str = value from database
NotifyIcon nic = new NotifyIcon();
nic.Text = str;
nic.BalloonTipText = str;
nic.BalloonTipTitle = title;
nic.Visible = true;
nic.ShowBalloonTip(1000, title, text, ToolTipIcon.Info);
}
how to work this perfectly,am stuck here
Upvotes: 0
Views: 1070
Reputation: 2203
You need to define an icon before call ShowBalloonTip to get this working:
nic.Icon = new Icon(@"PATH/TO/AN/ICON.ico");
Hope this helps
Upvotes: 1