سؤال

كيف تعرف ما إذا كان التطبيق مرئيا على شريط المهام؟

أنا أستخدم دلفي على ويندوز.

هل كانت مفيدة؟

المحلول

لم أحاول:

{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