Click here to Skip to main content
15,893,190 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Can Any one Help
I have created NotifyIcon for Window Service. When I started the service,the NotifyIcon does not display in task bar.

I have tried following code in Windos Service.

C#
using System;
using System.Collections.Generic;
using System.Text;
using System.Drawing;
namespace ConsoleApplication4
{
    class Program
    {
        private static System.Windows.Forms.NotifyIcon notifyIcon1;
        static void Main(string[] args)
        {
            notifyIcon1 = new System.Windows.Forms.NotifyIcon();
            notifyIcon1.BalloonTipTitle = "PriceLinkService Status";
            notifyIcon1.Text = "PriceLinkService Started \n" + DateTime.Now;
            notifyIcon1.BalloonTipText = "PriceLinkService Started \n" + DateTime.Now; ;
            notifyIcon1.Icon = new Icon("D:\\test.ico");
            notifyIcon1.Visible = true;
            notifyIcon1.ShowBalloonTip(1000);
        }

}
}



Posted
Comments
Sandeep Mewara 1-Oct-10 11:45am    
Please use 'Add Comment' feature to respond to an answer.

1 solution

Windows service can't communicate with user's desktop
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900