Mirror

How to determine if the Active Desktop is enabled (Views: 100)


Problem/Question/Abstract:

How to determine if the Active Desktop is enabled

Answer:

function IsActiveDeskTopOn: Boolean;
var
  Hd: HWND;
begin
  Result := False;
  Hd := FindWindow(Pchar('Progman'), nil);
  Hd := FindWindowEx(hd, 0, 'SHELLDLL_DefView', nil);
  Hd := FindWindowEx(hd, 0, 'Internet Explorer_Server', nil);
  if hd = 0 then
    Result := False
  else
    Result := True;
end;

<< Back to main page