弹出系统托盘未显示

时间:2017-10-23 07:29:56

标签: c# system-tray notifyicon

我正在尝试显示有关加载应用程序的消息。我试图使用Windows notifyIcon工具实现这一点。下面是我实现的方法,并在表单加载中调用它。但是,打开我的应用程序时没有显示任何消息。

private void Displaynotify()
    {
        try
        {
            //notifyIcon1.Icon = new System.Drawing.Icon(Path.GetFullPath(@"image\graph.ico"));
            notifyIcon1.Text = "Finance - Treasury Ticket Notification";
            notifyIcon1.Visible = true;
            notifyIcon1.BalloonTipTitle = "Welcome, you have 3 Pending Tickets.";
            notifyIcon1.BalloonTipText = "Click Here to see details";
            notifyIcon1.ShowBalloonTip(100);
        }
        catch (Exception ex)
        {

        }
    }


private void Form1_Load(object sender, EventArgs e)
    {
        Displaynotify();
    }

0 个答案:

没有答案