2009-12-07 69 views
1

如何知道應用程序在任務欄上是否可見?應用程序在任務欄上可見嗎?

我在windows上使用Delphi。

+0

我想你給過少的信息。一個VCL Delphi應用程序總是有一個任務欄按鈕,所以答案是「你知道,因爲它總是在那裏」。 – 2009-12-07 20:44:59

+0

我刪除了某些應用程序的任務欄按鈕 – Leo 2009-12-07 21:03:03

+0

請記錄您「刪除任務欄」按鈕的含義。提供代碼或屬性來執行此操作。 – 2009-12-07 21:50:54

回答

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 
+0

完美,謝謝司馬 – Leo 2009-12-12 15:34:37

0

難道你

Application.MainFormOnTaskbar := False; 

Application.MainForm.Visible := False; 
Application.ShowMainForm := False; 
相關問題