Click here to Skip to main content
15,887,376 members
Home / Discussions / C#
   

C#

 
AnswerRe: Capturing key presses or key strokes Pin
OriginalGriff23-Oct-09 9:28
mveOriginalGriff23-Oct-09 9:28 
GeneralRe: Capturing key presses or key strokes Pin
Lutosław23-Oct-09 9:57
Lutosław23-Oct-09 9:57 
GeneralRe: Capturing key presses or key strokes Pin
AndyASPVB23-Oct-09 10:49
AndyASPVB23-Oct-09 10:49 
GeneralRe: Capturing key presses or key strokes Pin
Anthony Mushrow23-Oct-09 16:54
professionalAnthony Mushrow23-Oct-09 16:54 
AnswerRe: Capturing key presses or key strokes Pin
Henry Minute23-Oct-09 12:38
Henry Minute23-Oct-09 12:38 
GeneralRe: Capturing key presses or key strokes Pin
Rajesh R Subramanian23-Oct-09 23:10
professionalRajesh R Subramanian23-Oct-09 23:10 
GeneralRe: Capturing key presses or key strokes Pin
Henry Minute25-Oct-09 1:10
Henry Minute25-Oct-09 1:10 
GeneralRe: Capturing key presses or key strokes Pin
Rajesh R Subramanian25-Oct-09 1:55
professionalRajesh R Subramanian25-Oct-09 1:55 
I'm sorry about your connection speed but I had a laugh. Laugh | :laugh:

Henry Minute wrote:
My point was that Alt-Space is one of the less well known keyboard shortcuts but nonetheless some people do use it (me for instance) and because of that it might be worth the OP considering an alternative.


There are many valid reasons to execute code when the user is pressing this key combo (amongst many other combos). For instance, if your application does not have a system menu, and you want to emulate it yourself. Or your application is largely ownerdrawn (we have an app where there's just one window and everything else is drawn as bitmaps in runtime) and it emulates a lot of stuff (context menu drawing, system menu drawing, cursor, etc.,) based on keyboard and mouse inputs. This can be done only with the help of a hook. And this is not going to affect the way other applications work (you execute your code, only if your window is active).

Henry Minute wrote:
As far as I am aware you can capture any key combo with a global hook


Not any key combo. The SAS (Ctrl+Alt+Del) key combo is not something that can be trapped because it triggers a hardware interrupt that isn't notified of outside the ring0 level. (OK, may be that can as well be trapped, but that will require ninja windows programming skills). Even with ninja skills, it is almost impossible to trap it on x64 versions of Windows, because of Kernel Patch Protection.


“Follow your bliss.” – Joseph Campbell

GeneralRe: Capturing key presses or key strokes Pin
Henry Minute25-Oct-09 4:40
Henry Minute25-Oct-09 4:40 
AnswerRe: Capturing key presses or key strokes Pin
Rajesh R Subramanian23-Oct-09 23:06
professionalRajesh R Subramanian23-Oct-09 23:06 
QuestionSending a command to an IEnumerable method Pin
Lutosław23-Oct-09 9:13
Lutosław23-Oct-09 9:13 
AnswerRe: Sending a command to an IEnumerable method Pin
Ian Shlasko23-Oct-09 9:55
Ian Shlasko23-Oct-09 9:55 
GeneralRe: Sending a command to an IEnumerable method Pin
Lutosław23-Oct-09 10:27
Lutosław23-Oct-09 10:27 
GeneralRe: Sending a command to an IEnumerable method Pin
Ian Shlasko23-Oct-09 10:38
Ian Shlasko23-Oct-09 10:38 
GeneralRe: Sending a command to an IEnumerable method Pin
Lutosław24-Oct-09 1:01
Lutosław24-Oct-09 1:01 
AnswerRe: Sending a command to an IEnumerable method [modified] Pin
harold aptroot23-Oct-09 10:08
harold aptroot23-Oct-09 10:08 
GeneralRe: Sending a command to an IEnumerable method Pin
Ian Shlasko23-Oct-09 10:33
Ian Shlasko23-Oct-09 10:33 
GeneralRe: Sending a command to an IEnumerable method Pin
harold aptroot23-Oct-09 10:35
harold aptroot23-Oct-09 10:35 
GeneralRe: Sending a command to an IEnumerable method Pin
Ian Shlasko23-Oct-09 10:50
Ian Shlasko23-Oct-09 10:50 
GeneralRe: Sending a command to an IEnumerable method Pin
harold aptroot23-Oct-09 10:55
harold aptroot23-Oct-09 10:55 
GeneralRe: Sending a command to an IEnumerable method Pin
Ian Shlasko23-Oct-09 11:13
Ian Shlasko23-Oct-09 11:13 
GeneralRe: Sending a command to an IEnumerable method Pin
harold aptroot23-Oct-09 11:19
harold aptroot23-Oct-09 11:19 
GeneralRe: Sending a command to an IEnumerable method Pin
Ian Shlasko23-Oct-09 12:12
Ian Shlasko23-Oct-09 12:12 
GeneralRe: Sending a command to an IEnumerable method Pin
harold aptroot23-Oct-09 12:23
harold aptroot23-Oct-09 12:23 
GeneralRe: Sending a command to an IEnumerable method Pin
Ian Shlasko23-Oct-09 12:27
Ian Shlasko23-Oct-09 12:27 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.