delphi7 TGauge Tprogressbar 简单应用
2016-09-30 11:21
267 查看
unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, ComCtrls, Gauges; type TForm1 = class(TForm) pbCount100: TProgressBar; //在Win32标签页 Button1: TButton; gCount100: TGauge;//在Samples标签页 procedure FormCreate(Sender: TObject); procedure Button1Click(Sender: TObject); private { Private declarations } public { Public declarations } end; var Form1: TForm1; implementation {$R *.dfm} procedure TForm1.FormCreate(Sender: TObject); begin pbCount100.Max := 100; //max值 pbCount100.Smooth :=true;//进度条的显示的更加平滑 pbCount100.Step :=1;//步长 // gCount100.BorderStyle := bsSingle; gCount100.MaxValue :=100; gCount100.BackColor := TColor($00ff00);//进度条的背景色 绿 gCount100.ForeColor := TColor($0000ff);//进度条颜色 红 end; procedure TForm1.Button1Click(Sender: TObject); var i : Integer; begin for i:= 1 to 100 do begin pbCount100.Position := pbCount100.Position + 1; //TprogressBar 进度条位置 position gCount100.Progress := gCount100.Progress + 1; //TGauge 进度条位置 Progress // Application.ProcessMessages; Sleep(10); end; end; end.
相关文章推荐
- android ProgressBar和SeekBar简单应用
- AsyncTask 加载progressBar 的简单应用
- ProgressBar 基础应用(简单)
- delphi7 ADO 方式连接 sqlserver2008/2005 简单应用
- delphi7 TADODataSet TDBGridExt 简单应用
- ProgressBar简单应用
- delphi7 TADOConnection TADODataSet 简单应用
- delphi7 TActionManager TTreeView 简单应用
- ProgressBar 基础应用(简单)
- delphi7 TRzCheckTree TImageList 简单应用
- HTA的简单应用
- process类的简单应用
- Tomcat4/5连接池的设置及简单应用示例
- Tomcat4/5连接池的设置及简单应用示例
- J2ME应用实例——一个简单的计算器实现(附源代码)
- process类的简单应用
- 一个简单的定时器应用: VarTimer (java)
- Tomcat4/5连接池的设置及简单应用示例
- java(j2ee)应用-简单自定义标签开发全过程----之一(Inber)——JAVA夜未眠
- 有行统计项和列统计项的行列转换,以及EXCEL导入SQL的简单应用