Re: How do I manually create an icon in the system tray?
- From: "Peter Duniho" <NpOeStPeAdM@xxxxxxxxxxxxxxxx>
- Date: Wed, 04 Jul 2007 23:37:50 -0700
On Wed, 04 Jul 2007 22:51:01 -0700, Joseph Geretz <jgeretz@xxxxxxxxxx> wrote:
The conventional approach is easy enough; drop a NotifyIcon onto a Form.
When the form is loaded - bingo - the icon appears in the System Tray.
I can't use this approach though. I'm writing a service. But I'd like my
service to install an icon on the System Tray so that the user can start /
stop / and otherwise control the service interactively, and without having
to go to the Services applet. How do I do this?
Hmmm...I thought that services by definition were not allowed to have UI. That would preclude the service itself from using the system tray for a notify icon.
I do note that the "drop a NotifyIcon onto a Form" is just a shortcut for instantiating a NotifyIcon instance. I suppose you could try doing that from your service. But because of the above, I wouldn't expect it to work.
If it doesn't work, as predicted, I would expect that the only solution would be to do what you'd have to do anyway, which is to write an independent application that communicates with the service, and which presents the UI to the user. Including (or even limited to) a NotifyIcon, if that's what you want.
Pete
.
- Follow-Ups:
- Re: How do I manually create an icon in the system tray?
- From: Joseph Geretz
- Re: How do I manually create an icon in the system tray?
- References:
- How do I manually create an icon in the system tray?
- From: Joseph Geretz
- How do I manually create an icon in the system tray?
- Prev by Date: Richtext box and third party control
- Next by Date: Re: When is "volatile" used instead of "lock" ?
- Previous by thread: How do I manually create an icon in the system tray?
- Next by thread: Re: How do I manually create an icon in the system tray?
- Index(es):
Relevant Pages
|