Code/Resource
Windows Develop
Linux-Unix program
Internet-Socket-Network
Web Server
Browser Client
Ftp Server
Ftp Client
Browser Plugins
Proxy Server
Email Server
Email Client
WEB Mail
Firewall-Security
Telnet Server
Telnet Client
ICQ-IM-Chat
Search Engine
Sniffer Package capture
Remote Control
xml-soap-webservice
P2P
WEB(ASP,PHP,...)
TCP/IP Stack
SNMP
Grid Computing
SilverLight
DNS
Cluster Service
Network Security
Communication-Mobile
Game Program
Editor
Multimedia program
Graph program
Compiler program
Compress-Decompress algrithms
Crypt_Decrypt algrithms
Mathimatics-Numerical algorithms
MultiLanguage
Disk/Storage
Java Develop
assembly language
Applications
Other systems
Database system
Embeded-SCM Develop
FlashMX/Flex
source in ebook
Delphi VCL
OS Develop
MiddleWare
MPI
MacOS develop
LabView
ELanguage
Software/Tools
E-Books
Artical/Document
Unit1.pas
Package: jindutiao.rar [view]
Upload User: hy6789
Upload Date: 2021-02-22
Package Size: 164k
Code Size: 1k
Category:
StatusBar
Development Platform:
Delphi
- unit Unit1;
- interface
- uses
- Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
- Dialogs, ComCtrls, StdCtrls, ExtCtrls;
- type
- TForm1 = class(TForm)
- ProgressBar1: TProgressBar;
- Button1: TButton;
- Button2: TButton;
- Button3: TButton;
- procedure Button1Click(Sender: TObject);
- procedure FormCreate(Sender: TObject);
- procedure Button2Click(Sender: TObject);
- procedure Button3Click(Sender: TObject);
- private
- { Private declarations }
- public
- { Public declarations }
- end;
- var
- Form1: TForm1;
- n:integer;
- s:integer;
- implementation
- {$R *.dfm}
- procedure TForm1.Button1Click(Sender: TObject);
- var
- i:integer;
- begin
- form1.ProgressBar1.Position:=0;
- form1.ProgressBar1.Step:=1;
- for i:=1 to 100000 do
- form1.ProgressBar1.StepIt;
- end;
- procedure TForm1.FormCreate(Sender: TObject);
- var
- count:integer;
- begin
- n:=110000;
- s:=0;
- count:=100000;
- progressbar1.Min:=1;
- progressbar1.Max:=count;
- //SetWindowLong(ProgressBar1.Handle,GWL_EXSTYLE,
- //GetWindowLong(ProgressBar1.Handle,GWL_EXSTYLE)and(not WS_EX_STATICEDGE));{去掉progressbar的边框}
- // 设置progressbar的背景颜色
- Progressbar1.Brush.Color := cllime;
- // 设置progressbar的进度条颜色
- PostMessage(ProgressBar1.Handle, $0409, 0, clred);
- end;
- procedure TForm1.Button2Click(Sender: TObject);
- begin
- n:=n - 10000;
- ProgressBar1.Position:=n;
- end;
- procedure TForm1.Button3Click(Sender: TObject);
- begin
- s:=s + 10000;
- ProgressBar1.Position:=s;
- end;
- end.