Blokada Alt + Tab w XP

0

Witam, jak zablokować Alt + Tab w XP?
Znalazłem takie coś : (ale nie wiem jak zadeklarować HOT_ALT_TAB):

procedure Disable_AltTab_AltSpace(Value : boolean);
begin
  case Win32Platform of

    VER_PLATFORM_WIN32_WINDOWS  : if Value then

SystemParametersInfo(SPI_SETFASTTASKSWITCH, Word(true ), nil, 0)
                                  else

SystemParametersInfo(SPI_SETFASTTASKSWITCH, Word(false), nil, 0);

    VER_PLATFORM_WIN32_NT       : if Value then begin
                                    RegisterHotKey(Application.Handle,
HOT_ALT_TAB,   MOD_ALT, VK_TAB  );
                                    RegisterHotKey(Application.Handle,
HOT_ALT_SPACE, MOD_ALT, VK_SPACE);
                                  end else begin
                                    UnRegisterHotKey(Application.Handle,
HOT_ALT_TAB  );
                                    UnRegisterHotKey(Application.Handle,
HOT_ALT_SPACE);
                                  end; {if}
  end; {case}
end; {Disable_AltTab_AltSpace}
0

Ja znalazlem taki kod, z ktorego wynika, ze to moze byc dowolna liczba.

const
 HOT_ALT_TAB             = 202;    // Can be what you want it to be !
// Kill the alt-tab support
procedure Disable_AltTab(Value : boolean);
begin
  case Win32Platform of

    VER_PLATFORM_WIN32_WINDOWS  : 
SystemParametersInfo(SPI_SETFASTTASKSWITCH, Word(Value), nil, 0);

    VER_PLATFORM_WIN32_NT       : if Value then
                                    RegisterHotKey(Application.Handle, 
HOT_ALT_TAB, MOD_ALT, VK_TAB)
                                  else
                                    UnRegisterHotKey(Application.Handle, 
HOT_ALT_TAB);
  end; {case}
end; {Disable_AltTab}
0

Dziękuje, działa

1 użytkowników online, w tym zalogowanych: 0, gości: 1