taskbar item

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • ba.hons

    #1

    taskbar item

    Hello,

    i have written a .net windows service in C# and was wondering if
    anyone knew any good articles or examples on how i can create a
    taskbar item for this.

    I would like it to maybe show a number of actions when i hover over
    it.

    Any ideas on where i could find some info would be great, doesnt seem
    to be too much out there

    cheers

    Adam

  • Dave Sexton

    #2
    Re: taskbar item

    Hi Adam,

    Generally, Windows Services don't display a user interface aside from the
    rare MessageBox popup.

    If you want an icon to appear in the task tray you should create a WinForms
    application.

    1. Create a Form and add a NotifyIcon component to it.
    2. You can set the Form's ShowInTaskBar property to false and call Hide() to
    make sure it's not visible.
    3. Users can add a shortcut to your app in their Startup folder if they'd
    like it to start when Windows is started, like a service.

    NotifyIcon Component Overview (Windows Forms)
    http://msdn2.microsoft.com/en-gb/library/a551e3ba.aspx

    You could, technically, do this and still have a Windows Service that runs
    in the background. To communicate between the two processes you'll have to
    use inter-process communication techniques such as Remoting with an
    IpcChannel or WCF. The WinForms application could then display the
    graphical interface for the Windows Service. It's rare that such a solution
    is required, though, so carefully consider whether a WinForms application
    will be all that you'll need.

    --
    Dave Sexton

    http://www.codeplex.com/DocProject (Sandcastle in Visual Studio 2005)

    "ba.hons" <ba.hons@gmail. comwrote in message
    news:1170716230 .430008.54800@p 10g2000cwp.goog legroups.com...
    Hello,
    >
    i have written a .net windows service in C# and was wondering if
    anyone knew any good articles or examples on how i can create a
    taskbar item for this.
    >
    I would like it to maybe show a number of actions when i hover over
    it.
    >
    Any ideas on where i could find some info would be great, doesnt seem
    to be too much out there
    >
    cheers
    >
    Adam
    >

    Comment

    Working...