DelphiFAQ Home Search:
General :: Windows :: Programming :: Windows with Delphi :: Windows API
Windows programming with Delphi

Articles:

This list is sorted by recent document popularity (not total page views).
New documents will first appear at the bottom.

Only the 40 most recently viewed articles are shown.
You can see the full list here.

Featured Article

Trapping Win-E shortcut to Explorer for a kiosk application

Question:

I'm trying to prevent an NT workstation user from being able to use any and all non-alphanumeric keys on the keyboard. More preciselly, I'm trying to trap all the Win (Start Key) shortcuts, like Win-E which invokes an instance of Windows Explorer. At this point, I would settle for disabling ALL keystrokes.

I am using Joe Hecht's excellent example of how to create a system-wide keyboardhook. This part works well. I am able to trap the Win key, when it is pressed by itself so that it doesn't invoke the Start menu on the desktop. But, it doesn't seem to trap the Win-E combination.

Answer:

A possible solution would be to define your own application to be the shell. No Explorer shell, no taskbar, no start button, no start button shortcuts... All this requires is a change to the registry key that defines the shell application.

You would have to reboot to make this registry change effective or you could try to change the key and then destroy the Explorer process.

If you replace the shell and kill the Explorer, it will start your application as the shell. Make sure that your application is checking whether its already in memory so that it's not running two instances. Check the 'see also' documents for more information on this one.

Generated 12:02:08 on Sep 18, 2018