应用程序在任务栏上可见?

时间:2009-12-07 18:57:44

标签: windows delphi taskbar

如何知道应用程序是否在任务栏上可见?

我在Windows上使用Delphi。

2 个答案:

答案 0 :(得分:3)

我没试过:

{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

答案 1 :(得分:0)

你玩过

吗?
Application.MainFormOnTaskbar := False;

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