A service has no concept of user interface, thus click events are pointless
to it. You can however allow it to interact with the desktop, but its
cumbersome.
See this thread.
http://groups.google.co.uk/group/mic...6e24000f87a629
Its definatelyt nor recommened in a .net service. If I was developing this
I would create a small desktop application to listen for clicks, and
communciate them to the listening service via a socket call. One other
thing - youre talking about a global event hook and thats highly processor
and resource hungry.
http://www.codeproject.com/csharp/globalhook.asp
--
Regards
John Timney
ASP.NET MVP
Microsoft Regional Director
"Benoit Martin" <be****@digitalmediums.com> wrote in message
news:eW*************@TK2MSFTNGP10.phx.gbl...
Is it possible to detect a mouse click from a .net service. I want a
process running in the background that will detect when the user clicks
the mouse button (anywhere on the screen) and executes an action
accordingly.
All the event handlers for the mouse that I see are for Windows Forms. Is
there a way to do it without any controls on the screen?
Thanks