Service and contextMenu

  • Thread starter Thread starter Mikkel Rasmussen
  • Start date 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
 
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.
 
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
 
Back
Top