如何知道应用程序是否在任务栏上可见?
我在Windows上使用Delphi。
答案 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;