如何知道如果一个应用程序在任务栏上显示?

我的窗口上用Delphi。

有帮助吗?

解决方案

我没有尝试:

{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

其他提示

你玩

Application.MainFormOnTaskbar := False;

Application.MainForm.Visible := False;
Application.ShowMainForm := False;
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top