c# - Unregistering the Alt-Tab hotkey in Windows 7 -


I think this problem should be easy to solve, and I'm bringing it here because I really think I have looked for solution everywhere

My code is written in C # and should only write Alt-Tab hotkey. This line works in XP, but returns false to 7:

  register hotkey (handle, id__ ALT_TAB, MOD_ALT, VK_TAB));  

I know that Windows 7 is now necessary that before I can register my new name, before I cancel the hotkey, and this is the problem where the problem When I check on the previous error code, I get the code 140 9, which means that the hotkey already exists. However, if I call this one above the line before:

  UngratterHack (handle, ID__ ALT_TAB));  

This row fails and the last error code is set to 1419, which means that such a hotkey does not exist. These lines work in XP, and I am able to register a hotkey and then unregister it. I believe this because I am trying to uncheck a hotkey with the wrong ID, because ID_ ALT_TAB is self-defined. I have been able to get the correct identity of Windows-level Alt-Tab HotKey. Any help or general indicators Would be appreciated.

I do not think there is a way to do this. It is not mentioned, even if you manage to enter your hotkey on top of the existing one in any one way, even then what happens when your application comes out? Suddenly, there is no Alt-Tab.

Instead, I had to go with another shortcut to trigger your replacement. Maybe Ctrl-Alt-Tab?


Comments