Service and contextMenu

  • Thread starter Mikkel Rasmussen
  • Start date
M

Mikkel Rasmussen

Hi

I'm trying to create a Windows Service with a notifyIcon and a ContextMenu
to be able to interact with the service.

I can make the notifyIcon appear, but I can't make it respond to
mouse-events
(tried the mousedown event)

I think, it's because I need some sort of control-container (with a
message-processor)
to handle these events but how to do it ? - without putting a form in
there.. is there a "best practice" ?!? Is it possible to assign
message-processing to a service?

regards
Mikkel
 
H

Herfried K. Wagner [MVP]

Mikkel Rasmussen said:
I'm trying to create a Windows Service with a notifyIcon and a ContextMenu
to be able to interact with the service.

I can make the notifyIcon appear, but I can't make it respond to
mouse-events
(tried the mousedown event)

I think, it's because I need some sort of control-container (with a
message-processor)
to handle these events but how to do it ? - without putting a form in
there.. is there a "best practice" ?!? Is it possible to assign
message-processing to a service?

You will have to write a simple Windows Forms application that
communicates with the service.
 
A

Allen

hey mike, I banged my head against this one for almost a
day till I finally found out that it can't be done.
While you can get an icon to show up in the taskbar from
a system service, you can't get a context menu to come
from it. You need to create a windows form app that only
resides in the taskbar that communicates with your system
service.

yes, it sucks.

gl
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top