Delphi 下 TProgressBar的使用
来源:互联网 发布:ftp的默认端口 编辑:程序博客网 时间:2024/06/08 18:28
通过例子来简单了解下TProgressBar的使用。
pas文件程序如下
unit Unit4;interfaceuses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, ComCtrls;type TForm4 = class(TForm) progress: TProgressBar; procedure FormCreate(Sender: TObject); private { Private declarations } public { Public declarations } end;var Form4: TForm4;implementation{$R *.dfm}procedure TForm4.FormCreate(Sender: TObject);var I: Integer;begin try progress.Max := 100; for I := 0 to 100 - 1 do begin Application.ProcessMessages; progress.Position := I; Sleep(50); end; finally //progress.Max := 0; end; end;end.fram文件如下:
object Form4: TForm4 Left = 0 Top = 0 Caption = 'Form4' ClientHeight = 300 ClientWidth = 635 Color = clBtnFace Font.Charset = DEFAULT_CHARSET Font.Color = clWindowText Font.Height = -11 Font.Name = 'Tahoma' Font.Style = [] OldCreateOrder = False OnCreate = FormCreate PixelsPerInch = 96 TextHeight = 13 object progress: TProgressBar Left = 0 Top = 283 Width = 635 Height = 17 Align = alBottom TabOrder = 0 endend
实际运行结果如图所示:
以上程序即可简单的使用TProgressBar。
阅读全文
0 0
- Delphi 下 TProgressBar的使用
- BCB中进度条TProgressBar的使用
- Delphi下的ShellExecute使用
- 关于Delphi下的ADO的使用
- Delphi 下全局对象的使用
- Delphi下汉字输入法的编程及使用
- 在delphi下TClientSocket的使用技巧
- Delphi下使用DUnit的方法
- Delphi下TWebBrowser控件的使用
- Delphi 7下IGDIPlus库的使用
- Delphi 下 VCLZip控件的简单使用
- Delphi下TAutoUpgradePro的使用体会
- Delphi下使用指针的简单总结
- Delphi下断言的使用示例
- Delphi下使用指针的简单总结
- Delphi下dll的创建与使用
- Delphi下使用指针的简单总结
- TProgressBar应用
- NOIP算法每周过之 线段树 区间 区间修改 区间查值 模板
- Python常用工具安装
- pat 乙级 1050. 螺旋矩阵(25)
- Hibernate search使用示例(基础小结-注解方式)
- html+css小练习
- Delphi 下 TProgressBar的使用
- Android中四大组件之Activity(一)
- VS2015 C#连接MySQL
- JSP基本语法
- Elasticsearch 默认分词器和中分分词器之间的比较及使用方法
- 洛谷P1119灾后重建
- Layui 中使用vaildate 报错 $(#form).validate is not a function
- mui.toast样式风格及位置修改教程
- 【leetcode】14. Longest Common Prefix(Python & C++)