Disable start menu from opening with keyboard combo?

我只是一个虾纸丫 提交于 2019-12-08 13:30:36

问题


How do I prevent the start menu from opening by using the keyboard shortcuts / combo (aka windows key and CTRL + ESC) ?

I am able to hide the taskbar, and receive the keys but I don't know how do I disable them, I need to disable it until the user is authenticated with the system.

Is there a policy I can use to disable them or how do I do it ?


回答1:


This sounds like a job for hooks

http://www.codeproject.com/KB/cs/globalhook.aspx

Update:

From MSDN:

A global hook monitors messages for all threads in the same desktop as the calling thread. A thread-specific hook monitors messages for only an individual thread. A global hook procedure can be called in the context of any application in the same desktop as the calling thread, so the procedure must be in a separate DLL module. A thread-specific hook procedure is called only in the context of the associated thread.

In other words, if you use a global hook like in the link, you can capture system events and either process them like normal events or suppress them.

Another Update: Here is another example which was created with the Windows key and CTRL+ESC in mind.




回答2:


Would the example here be what you are looking for? http://geekswithblogs.net/aghausman/archive/2009/04/26/disable-special-keys-in-win-app-c.aspx




回答3:


I've never done this myself, but I heard that you should replace explorer shell with your program for that kind of application. Look into it, maybe it's the way to go..

http://www.ehow.com/how_5688935_replace-window-shells.html

https://groups.google.com/group/microsoft.public.windows.server.scripting/browse_frm/thread/fa1760ad06c77259?hl=en&pli=1



来源:https://stackoverflow.com/questions/5586168/disable-start-menu-from-opening-with-keyboard-combo

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!