Results 1 to 4 of 4

Thread: creating notifyicon in windows service

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Feb 2007
    Posts
    153

    creating notifyicon in windows service

    hi to all,
    i want to create the notify icon in the service. i was created notify icon using the following code.

    private NotifyIcon notifyIcon1 = new NotifyIcon();

    this.notifyIcon1.Text = "DataBaseIntegrator";
    this.notifyIcon1.Icon = ApplicationIcon;
    this.notifyIcon1.Visible = true;
    this.notifyIcon1.ShowBalloonTip(3000, "Service", "Service Started", ToolTipIcon.Info);

    but its not working properly.what is the problem in the coding. plz help me to solve the problem.
    thank u
    with thanks and regards
    mmary

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: creating notifyicon in windows service

    What does "not working properly" mean? What happens when you run it?

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Feb 2007
    Posts
    153

    Re: creating notifyicon in windows service

    thank u for ur reply. it was not showing the notifyicon.

    with thanks and regards
    mmary

  4. #4
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: creating notifyicon in windows service

    Windows Services don't have a UI. A NotifyIcon is a UI element. If there's no UI then a UI element cannot be shown. If you want a NotifyIcon then you need to create a Windows Forms application. If you need the behaviour of a Windows service then you can created both and have them communicate.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width