Leo
Leo

Reputation: 1811

Application is visible on taskbar?

How to know if a Application is visible on taskbar?

I am using Delphi on windows.

Upvotes: 1

Views: 733

Answers (2)

SimaWB
SimaWB

Reputation: 9294

I didn't try :

{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

Upvotes: 3

Francesca
Francesca

Reputation: 21640

Did you play with

Application.MainFormOnTaskbar := False;

and

Application.MainForm.Visible := False;
Application.ShowMainForm := False;

Upvotes: 0

Related Questions