2

I'm using the Windows API (SetWindowsHookEx) to capture keyboard events. I would like to pass the Ctrl+Shift+Esc combination to my application for processing but suppress Task Manager appearing.

Unfortunately, it looks like the three key combination never gets as far as my Keyboard Hook routine; I only ever get two keys.

I don't want to suppress Task Manager globally, just for my application.

Is there a way to do this?

Guillermo Phillips
  • 2,176
  • 1
  • 23
  • 40
  • Are you using global hooks to monitor all threads? – Paul May 05 '10 at 15:35
  • No just the application thread. In fact: hHook1 = SetWindowsHookEx(&H2&, AddressOf KeyboardProc, 0&, App.ThreadID) – Guillermo Phillips May 05 '10 at 15:37
  • You might want to take a look at this thread - http://stackoverflow.com/questions/1292165/how-to-trap-the-keyboard-strokes-on-a-c-win-forms-application-ctrl-alt-del - and in particular this link from that thread -http://tamaspiros.co.uk/2007/12/20/c-disable-ctrl-alt-del-alt-tab-alt-f4-start-menu-and-so-on/ – macbutch May 05 '10 at 15:48

1 Answers1

0

Just my 2 cents, but I believe it is not possible. This combo is some kind of last resort, and if apps could catch it, and then hang... I am very sure, this event is not delivered by normal means. And even if an app would be able to catch this... I would deinstall it at once for disturbing my work experience.

Catch Ctrl-Alt-Insert, if you need to provide similar functionality.

Daniel
  • 27,718
  • 20
  • 89
  • 133
  • Thanks. But I'm writing an emulator, so in that sense it is a non-standard Windows app. In the emulator Ctrl+Shift pauses scrolling and then pressing Escape breaks out of the scroll. – Guillermo Phillips May 05 '10 at 15:48
  • VMWare, LogMeIn also doesn't catch Ctrl-Alt-Delete (because they can't), but Ctrl-Alt-Insert. Users get used to it. – Daniel May 05 '10 at 16:38