By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,997 Members | 1,098 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,997 IT Pros & Developers. It's quick & easy.

taskbar item

P: n/a
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

Feb 5 '07 #1
Share this Question
Share on Google+
1 Reply


P: n/a
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://davesexton.com/blog
http://www.codeplex.com/DocProject (Sandcastle in Visual Studio 2005)

"ba.hons" <ba*****@gmail.comwrote in message
news:11*********************@p10g2000cwp.googlegro ups.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

Feb 6 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.