Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Use the <a href="http://msdn.microsoft.com/en-us/library/dd391692.aspx" rel="noreferrer"><code>ITaskbarList3</code></a> interface for that, specifically its <a href="http://msdn.microsoft.com/en-us/library/dd391697.aspx" rel="noreferrer"><code>SetProgressState</code></a> and <a href="http://msdn.microsoft.com/en-us/library/dd391698.aspx" rel="noreferrer"><code>SetProgressValue</code></a> methods. Use <code>CoCreateInstance()</code> specifying <code>CLSID_TaskbarList</code> and <code>IID_ITaskbarList3</code> to access the interface.</p> <p>For example:</p> <pre><code>type ITaskbarList = interface(IUnknown) ['{56FDF342-FD6D-11D0-958A-006097C9A090}'] function HrInit: HRESULT; stdcall; function AddTab(hwnd: HWND): HRESULT; stdcall; function DeleteTab(hwnd: HWND): HRESULT; stdcall; function ActivateTab(hwnd: HWND): HRESULT; stdcall; function SetActiveAlt(hwnd: HWND): HRESULT; stdcall; end; ITaskbarList2 = interface(ITaskbarList) ['{602D4995-B13A-429B-A66E-1935E44F4317}'] function MarkFullscreenWindow(hwnd: HWND; fFullscreen: BOOL): HRESULT; stdcall; end; THUMBBUTTON = record dwMask: DWORD; iId: UINT; iBitmap: UINT; hIcon: HICON; szTip: packed array[0..259] of WCHAR; dwFlags: DWORD; end; TThumbButton = THUMBBUTTON; PThumbButton = ^TThumbButton; ITaskbarList3 = interface(ITaskbarList2) ['{EA1AFB91-9E28-4B86-90E9-9E9F8A5EEFAF}'] function SetProgressValue(hwnd: HWND; ullCompleted: ULONGLONG; ullTotal: ULONGLONG): HRESULT; stdcall; function SetProgressState(hwnd: HWND; tbpFlags: Integer): HRESULT; stdcall; function RegisterTab(hwndTab: HWND; hwndMDI: HWND): HRESULT; stdcall; function UnregisterTab(hwndTab: HWND): HRESULT; stdcall; function SetTabOrder(hwndTab: HWND; hwndInsertBefore: HWND): HRESULT; stdcall; function SetTabActive(hwndTab: HWND; hwndMDI: HWND; tbatFlags: Integer): HRESULT; stdcall; function ThumbBarAddButtons(hwnd: HWND; cButtons: UINT; pButton: PThumbButton): HRESULT; stdcall; function ThumbBarUpdateButtons(hwnd: HWND; cButtons: UINT; pButton: PThumbButton): HRESULT; stdcall; function ThumbBarSetImageList(hwnd: HWND; himl: HIMAGELIST): HRESULT; stdcall; function SetOverlayIcon(hwnd: HWND; hIcon: HICON; pszDescription: LPCWSTR): HRESULT; stdcall; function SetThumbnailTooltip(hwnd: HWND; pszTip: LPCWSTR): HRESULT; stdcall; function SetThumbnailClip(hwnd: HWND; var prcClip: TRect): HRESULT; stdcall; end; const CLSID_TaskbarList: TGUID = '{56FDF344-FD6D-11d0-958A-006097C9A090}'; TBPF_NOPROGRESS = 0; TBPF_INDETERMINATE = $1; TBPF_NORMAL = $2; TBPF_ERROR = $4; TBPF_PAUSED = $8; var TBL: ITaskbarList3; I: Integer; begin CoCreateInstance(CLSID_TaskbarList, nil, CLSCTX_INPROC, ITaskbarList3, TBL); if (TBL &lt;&gt; nil) then TBL.SetProgressState(Application.Handle, TBPF_INDETERMINATE); try for I := 0 to 100 do begin if (TBL &lt;&gt; nil) then TBL.SetProgressValue(Application.Handle, I, 100); Sleep(1000); end; finally if (TBL &lt;&gt; nil) then TBL.SetProgressState(Application.Handle, TBPF_NOPROGRESS); end; end; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload