Lucas,
Usually Alt-F4 is process by the application code (not system wide). Often it is left to be processed by windows default procedure.
So the best way to disable it would be from the application code (just disable WM_CLOSE).
Otherwise, you would need to create a system wide keyboard hook (SetWindowsHookEx API). See the sample code here:
http://www.codeguru.com/Cpp/W-P/syst...cle.php/c5685/
Some more complete code you can leverage is here:
http://www.codeproject.com/win32/AntonioWinLock.asp
You can also change the MS keyboard driver (see DDK for the sample code), or try and play with Keyboard Layout scancode maps
([HKLM\SYSTEM\CurrentControlSet\Control\ Keyboard Layout],"Scancode Map").
Some ideas you can find in the docs:
http://msdn.microsoft.com/library/en...oardAccess.asp
--
KM,
BSquare Corp.
www.bsquare.com
> Hi,
>
> I need to disable the Alt-F4 key command in Xp embedded, searched for it but
> no help.
> I don't want to install a third party software for doing this. Isn't their a
> registry tweak or any other way to disable alt-f4?
>
> thanks for your help,
> Lucas