How to show a message with icon in the notification area

前端 未结 3 2092
执念已碎
执念已碎 2020-12-11 16:36

I am writing code in which if updates are available then I want to show a pop up message with balloon using C#. This is similar to \"Java Updates available\".

3条回答
  •  鱼传尺愫
    2020-12-11 16:41

    You can use NotifyIcon for this.

    this.WindowState = FormWindowState.Minimized;  
    notifyIcon.BalloonTipIcon = ToolTipIcon.Info;
    notifyIcon.BalloonTipTitle = "Notify Icon Test Application";
    notifyIcon.BalloonTipText = "You have just minimized the application." + 
                                Environment.NewLine + 
                                "Right-click on the icon for more options.";
    
    notifyIcon.ShowBalloonTip(5000);
    

    This will generate popup like one as below:

    enter image description here

    You can find more details on this link.

提交回复
热议问题