C-Sharp | Java | Python | Swift | GO | WPF | Ruby | Scala | F# | JavaScript | SQL | PHP | Angular | HTML
And: There you can add the MouseDoubleClick event handler, and set some properties such as BalloonTipText and Text.
ShowBalloonTip: This example uses the Load event on the enclosing form to show a balloon tip. When the program starts up, the balloon will show.
Note: Balloons are prominent notifications but don't interrupt the workflow of the user as much as dialogs.
MouseDoubleClick: When you double-click on the logo in the bottom right, you will get a dialog box. Then, the icon will vanish from the screen.
Example that demonstrates NotifyIcon: C#
using System;
using System.Windows.Forms;
namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
// When the program begins, show the balloon on the icon for one second.
notifyIcon1.ShowBalloonTip(1000);
}
private void notifyIcon1_MouseDoubleClick(object sender, MouseEventArgs e)
{
// When icon is double-clicked, show this message.
MessageBox.Show("Doing something important on double-click...");
// Then, hide the icon.
notifyIcon1.Visible = false;
}
}
}
Also: The BalloonTipIcon property gives you the ability to render an icon on the balloon.