How to show a message with icon in the notification area

前端 未结 3 2099
执念已碎
执念已碎 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 17:04

    There is a very simple single-line command you can write for this, instead of doing all that bulky thing others suggest:

    notifyIcon1.ShowBalloonTip(1000, "Text", "Title", ToolTipIcon.Warning);
    

    Remember that you need to have first initialized the control in your application so that this code works. You are free to adjust the control's name and the command's parameters according to your needs.

提交回复
热议问题