Reputation: 2367
When Firefox downloads a file, its title button on the taskbar doubles as a progress bar (it gets progressively painted green, starting from the left).
Other programs do it, too. (Windows Commander, AIMP3...)
How to do it with Lazarus? (Or using the Win API directly)
Upvotes: 0
Views: 1365
Reputation: 597670
This capability was introduced in Windows 7 as part of its Taskbar Extensions:
As of Windows 7, the taskbar has been extended significantly under the guiding principle of getting users where they're going as quickly and efficiently as possible. To that end, the application windows, files, and commands that the user needs to accomplish that are now centralized into a single taskbar button that consolidates previously scattered information sources and controls. A user can now find common tasks, recent and frequent files, alerts, progress notifications, and thumbnails for individual documents or tabs all in one place.
...
Progress Bars
A taskbar button can be used to display a progress bar. This enables a window to provide progress information to the user without that user having to switch to the window itself. The user can stay productive in another application while seeing at a glance the progress of one or more operations occurring in other windows. It is intended that a progress bar in a taskbar button reflects a more detailed progress indicator in the window itself. This feature can be used to track file copies, downloads, installations, media burning, or any operation that's going to take a period of time. This feature is not intended for use with normally peripheral actions such as the loading of a webpage or the printing of a document. That type of progress should continue to be shown in a window's status bar.
The taskbar button progress bar is a similar experience to the familiar Progress Bar control. It can display either determinate progress based on a completed percentage of the operation or an indeterminate marquee-style progress to indicate that the operation is in progress without any prediction of time remaining. It can also show that the operation is paused or has encountered an error and requires user intervention.
APIs
Upvotes: 2