A notifyicon is used to notify users at the bottom right corner of Windows screen. In order to create Notification application should use namespace System.Windows.Forms and we get NotifyIcon instance.
Example:
public Form1()
{
InitializeComponent();
string imgpath = Path.Combine(Application.StartupPath, @"images\infi.ico");
Notifyicon(imgpath);
}
private void Notifyicon(string path) {
NotifyIcon trayIcon = new NotifyIcon();
trayIcon.Icon = new Icon(path);
trayIcon.Text = "Newmessage";
trayIcon.Visible = true;
trayIcon.ShowBalloonTip(2000, "Information", "A new message received!", ToolTipIcon.Info);
}
Output:
Post your comments / questions
Recent Article
- How to fix CMOS Checksum Error in Computer or Laptop | SOLVED
- Reactivating windows after a Hardware change on PC or Laptop
- FIXED: Windows reported that the hardware of your device has changed. Error code :0xc004F211
- "redirect" is not defined pylance("reportUndefinedVariable)
- This action cannot be completed because the file is open in SQL Server(SQLEXPRESS) - FIXED
- Unicode error 'unicodeescape' codec can't decode bytes in position 2-3: truncated UXXXXXXXX escape
- Could not find the 'angular-devkit/build-angular:dev-server' builder's node package | Angular Error
- Error: error:0308010C:digital envelope routines::unsupported
Related Article