Sign in Join
Wiki copytemporary

Win32TaskbarProgress/zh CN

English · 中文(中国)

(Windows only)

关于

这是一个包含 控制进度条 的类的单元,用于控制 Windows 7+ 任务栏按钮的按钮。示例看起来像这样:

任务栏按钮进度可以有以下几种样式:

作者: Alexey Torgashin

协议: MIT

用法

在窗体的 OnShow (或者 OnCreate) 中创建对象,像这样:

pascal
uses
  win32taskbarprogress;

procedure TForm1.FormShow(Sender: TObject);
begin
  GlobalTaskbarProgress:= TWin7TaskProgressBar.Create;
end;

接下来,调用这个对象的属性,像这样:

pascal
  //来更改状态: none, green, yellow, red, floating
  GlobalTaskbarProgress.Style:= TTaskBarProgressStyle(ComboBoxStyle.ItemIndex);
 
  //来更改进度值:0 到 100
  GlobalTaskbarProgress.Progress:= Edit1.Value;

作者尝试在 win32taskbarprogress 的 "initialization" 部分初始化对象,但是失败了,可能是因为 Application.Handle 不能这么早地被初始化

下载

单元文件和示例工程: https://github.com/Alexey-T/Win32TaskbarProgress

贡献者和更改


From the Free Pascal wiki, page "Win32TaskbarProgress/zh CN", as it stood on 2020-12-29 after a change by Robsean, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's Licensing page. If you have concerns about this material, message the admin.

Revision 1, last changed by WikiArchive .

Edited on wiki.freepascal.org by 1 person, 2020

From the official wiki's backup of 26 May 2024: who edited this page there, and when. Edits made there after that date were not recorded, and the earlier versions are not shown here; the main page says why.

WhenWhoWhat changed
RobseanCreated page
RobseanUsage
RobseanDownload
RobseanAbout
Robsean
Robsean
Robsean

Talk about this page

Nobody has opened a bench for this page yet. Sign in to open one.