Domanda

Come sapere se un'applicazione è visibile sulla barra delle applicazioni?

Sto usando Delphi su Windows.

È stato utile?

Soluzione

non ho provato:

{Wnd = your app. handle}

    if IsWindowVisible(Wnd) 
       and
       ( (GetWindowLong(Wnd, GWL_HWNDPARENT) = 0) or (HWND(GetWindowLong(Wnd, GWL_HWNDPARENT)) = GetDesktopWindow) ) 
       and
       ((GetWindowLong(Wnd, GWL_EXSTYLE) and WS_EX_TOOLWINDOW) = 0)
    then 
      // your application is visible on taskbar

Altri suggerimenti

Hai giocato con

Application.MainFormOnTaskbar := False;

e

Application.MainForm.Visible := False;
Application.ShowMainForm := False;
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top