quote:Original post by DerekSawquote:
how can you disable alt+tab in windows 98 ?
I suppose you want to hear about the famous "screen saver" trick?
quote:
how can you disable alt+tab in windows 98 ?
I suppose you want to hear about the famous "screen saver" trick?
Yeap, trick Windows into thinking that the screensaver is running... this also disables ALT+CTRL+DEL but ONLY works on Windows 9x.
UINT nPreviousState;
// Disables task switching SystemParametersInfo (SPI_SETSCREENSAVERRUNNING, TRUE, &nPreviousState, 0);
// Enables task switching SystemParametersInfo (SPI_SETSCREENSAVERRUNNING, FALSE, &nPreviousState, 0);
Windows NT 4.0 Service Pack 3 and later Windows 2000 Applications can disable ALT+TAB by installing a low-level keyboard hook. A low-level keyboard hook is installed by calling SetWindowsHookEx();
LRESULT CALLBACK LowLevelKeyboardProc (INT nCode, WPARAM wParam, LPARAM lParam)
{
KBDLLHOOKSTRUCT *pkbhs = (KBDLLHOOKSTRUCT *) lParam;
BOOL bControlKeyDown = 0;
switch (nCode)
{
case HC_ACTION:
{
bControlKeyDown = GetAsyncKeyState (VK_CONTROL) >> ((sizeof(SHORT) * 8) - 1); // Disable CTRL+ESC
// Disable ALT+ESC
if (pkbhs->vkCode == VK_ESCAPE && pkbhs->flags & LLKHF_ALTDOWN)
return 1;
}
default:
break;
}
return CallNextHookEx (hHook, nCode, wParam, lParam);
}