Page 2 of 2 FirstFirst 12
Results 11 to 11 of 11

Thread: DirectX - How can I disable Alt+Tab / Crashes

  1. #11

    DirectX - How can I disable Alt+Tab / Crashes

    Try this to enable or diable Alt + Tab nad solve screensaver problems:

    Code:
    ...
    var s_alttab_disabled: boolean;
    
    procedure WIN_DisableAltTab;
    var
    old: Boolean;
    begin
    if s_alttab_disabled then
    Exit;
    
    if Win32Platform = VER_PLATFORM_WIN32_NT then
    RegisterHotKey(0, 0, MOD_ALT, VK_TAB)
    else
    SystemParametersInfo(SPI_SCREENSAVERRUNNING, 1, @old, 0);
    
    s_alttab_disabled := True;
    end;
    
    procedure WIN_EnableAltTab;
    var
    old: Boolean;
    begin
    if s_alttab_disabled then
    begin
    if Win32Platform = VER_PLATFORM_WIN32_NT then
    UnregisterHotKey(0, 0)
    else
    SystemParametersInfo(SPI_SCREENSAVERRUNNING, 0, @old, 0);
    
    s_alttab_disabled := False;
    end;
    end;
    
    ....
    
    initialization
    
    s_alttab_disabled := false;
    
    end.
    Last edited by Jimmy Valavanis; 30-03-2012 at 05:32 PM.

Page 2 of 2 FirstFirst 12

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •