Re: newbie: Can I intercept specific keystrokes?

From: Herfried K. Wagner [MVP] (hirf-spam-me-here_at_gmx.at)
Date: 10/28/04


Date: Thu, 28 Oct 2004 22:26:52 +0200


"Carol" <Carol@discussions.microsoft.com> schrieb:
> Is there a way to trigger an event when an individual key
> is pressed, as well as with key combinations and function
> keys? I want to trigger an event when the SHIFT key is
> pressed. I also want this to happen whether the form has or
> doesn't have the focus

You'll need a keyboard hook to capture these keystrokes system-wide:

Article on keyboard hooks:

<URL:http://www.developer.com/net/net/article.php/11087_2193301_1/>

Documentation on hooks:

<URL:http://msdn.microsoft.com/library/en-us/dnwui/html/msdn_hooks32.asp>
<URL:http://msdn.microsoft.com/library/en-us/winui/winui/windowsuserinterface/windowing/hooks.asp>

-- 
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/> 


Relevant Pages

  • Re: How to create an automated input box.
    ... "cmdolcet69" schrieb ... its less then 12 long it will trigger a message box if its equal it ... Private Sub Button1_Click(ByVal sender As System.Object, ... handler and additionally in the Textbox' TextChanged event. ...
    (microsoft.public.dotnet.languages.vb)
  • Re: triggering a macro
    ... "Sam" schrieb im Newsbeitrag ... > I need to trigger a macro when there is a change in a cell.. ...
    (microsoft.public.excel.misc)
  • Re: Some problems I have with Delphi 2007 update 1
    ... Maël Hörz schrieb: ... This happens to me from time to time under Delphi 7, without modifying code. ... Can't say exactly what has to be done to trigger it though. ...
    (borland.public.delphi.non-technical)
  • newbie: Can I intercept specific keystrokes?
    ... Is there a way to trigger an event when an individual key is pressed, ... as with key combinations and function keys? ... the SHIFT key is pressed. ...
    (microsoft.public.dotnet.languages.vb)
  • RE: How to create trigger on view?
    ... "kitty28" schrieb: ... please, to instruct for me. ... Look up in Books online (Create Trigger). ...
    (microsoft.public.sqlserver.security)