I found now the right article on msdn
http://support.microsoft.com/?scid=kb%3Ben-us%3B226359&x=19&y=11
it says:
Quote:
SUMMARY
This article describes how to disable task switching and other system functions accessed through key combinations such as CTRL+ESC and ALT+TAB on Win32 Platforms.
Back to the top Back to the top
Windows 95 and Windows 98
Applications can enable and disable ALT+TAB and CTRL+ESC, for example, by calling SystemParametersInfo (SPI_SETSCREENSAVERRUNNING). To disable ALT+TAB and CTRL+ESC, set the uiParam parameter to TRUE; to enable the key combinations, set the parameter to FALSE:
UINT nPreviousState;
// Disables task switching
SystemParametersInfo (SPI_SETSCREENSAVERRUNNING, TRUE, &nPreviousState, 0);
// Enables task switching
SystemParametersInfo (SPI_SETSCREENSAVERRUNNING, FALSE, &nPreviousState, 0);
Note Applications that use SystemParametersInfo (SPI_SETSCREENSAVERRUNNING) to disable task switching must enable task switching before exiting or task switching remains disabled after the process terminates.
So I found out that
1. SPI_SETSCREENSAVERRUNNING is only neccessary for Win9x Systems.
My Win2000 System blocks Alt+Tab, etc. with anything run as a Screensaver (even a MsgBox). So I guess, all WinNT-based Systems will block these Key-Combinations on their own, when the screensaver is running.
2. My Code-Guess was incorrect, i know believe that it should be
Code:
DllCall("SystemParametersInfo", "Str", "SPI_SETSCREENSAVERRUNNING", "UInt", "1", "UInt*", previousstate, "UInt", "0")
for blocking , and
Code:
DllCall("SystemParametersInfo", "Str", "SPI_SETSCREENSAVERRUNNING", "UInt", "0", "UInt*", previousstate, "UInt", "0")
for unblocking, where "previousstate" is just the name of the var which will contain the previous state of SPI_SETSCREENSAVERRUNNING.
but this is still untested, caused by the lack of a Win9x System