setTaskBarProgress

setTaskBarProgress(value:  Integer;
                   maxVal: Integer);

The setTaskBarProgress method of the Form class sets the extent of the progress to be displayed on the application icon in the taskbar.

If the method is called:

This functionality is available only if the application displays an icon on the Windows taskbar. It does not apply to icons in the system tray.

If two forms call the setTaskBarProgress method while the taskbar progress is displayed, the progress displays the lowest value.

The method call can silently fail for some earlier versions of Windows (for example, Windows 8.0), even though the Microsoft documentation states that the functionality is available from Windows 7 and later.

Calling this method causes the progress indicator to be displayed in its set state. If the current state was TaskBar_State_NoProgress or TaskBar_State_Indeterminate, the state becomes TaskBar_State_Normal.

The setTaskBarProgress method value parameter specifies the current progress value and the maxVal parameter specifies the maximum value that will be reached. Both values are relative to zero (0).

To hide the progress state when the action is completed, call the setTaskBarState method with the state parameter set to TaskBar_State_NoProgress.