There is no good, clean way to intercept the pressing of keys (or mouse
events) unless you're controlling a window that has the focus.

The only thing that comes to mind is to install an application-wide windows
hook for keyboard events. This is C++ - class work; I would not even attempt
it with p/invoke, but instead would go for a piece of MC++ (with some
unmanaged code to tie up to the actual hook chain)

Done it before, works beautifully, but is not for the faint of heart.


-----Original Message-----
From: Discussion of advanced .NET topics.
[mailto:[EMAIL PROTECTED] On Behalf Of Knowlton, Gerald
F.
Sent: Friday, November 03, 2006 2:07 PM
To: ADVANCED-DOTNET@DISCUSS.DEVELOP.COM
Subject: [ADVANCED-DOTNET] Looking for additional functions for
MY.COMPUTER.KEYBOARD class.

Hi all,

    Does anyone know of a way to use the My.Computer.Keyboard class to
detect when a user has press the 'Enter' key. I would like  to use this
in a dll (does not contain a form).

If not, would someone please point me towards a way of accomplishing
this task?


Thank you very much for your time and knowledge.


Best regards,


Jerry

===================================
This list is hosted by DevelopMentor.  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com

===================================
This list is hosted by DevelopMentorĀ®  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com

Reply via email to