I use ShowBalloonTip method of a TrayIcon class to display a balloon tip. Is there a way to handle a click over this balloon? When i click over the balloon no event seem to be generated, and it only closes the balloon.
views:
34answers:
2
+1
Q:
how in .net i handle a click over a balloon tip, displayed through ShowBalloonTip of a TrayIcon
+4
A:
I think you mean NotifyIcon . Use following pattern...
NotifyIcon notifyIcon = null;
public Form1()
{
InitializeComponent();
notifyIcon = new NotifyIcon();
// Initializing notifyIcon here...
notifyIcon.BalloonTipClicked += new EventHandler(notifyIcon_BalloonTipClicked);
}
void notifyIcon_BalloonTipClicked(object sender, EventArgs e)
{
// Operation you want...
}
I hope it feed your needs...
Jalal Amini
2010-07-05 18:58:11
A:
Have you tried the following snippet? I managed to find it whilst doing a quick google search:
private void TrayNotifyIcon_BalloonClick(object sender, EventArgs e)
{
//Perform Action
}
Obviously you'll need to make sure you specify the correct name in the method signature for your own application.
I think this was written in an older version of the .Net Framework and there's probably a newly named method for it.
Source: Build a C# Notification System
Jamie Keeling
2010-07-05 19:02:06