Главная страница
Top.Mail.Ru    Яндекс.Метрика
Текущий архив: 2002.12.02;
Скачать: CL | DM;

Вниз

билн помогите............   Найти похожие ветки 

 
masterlomaster ©   (2002-11-11 19:26) [0]

unit Unit1;

interface

uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
ComCtrls, StdCtrls, Spin, ExtCtrls;

type
TForm1 = class(TForm)
Shape1: TShape;
Button1: TButton;
SpinEdit1: TSpinEdit;
ProgressBar1: TProgressBar;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;

var
Form1: TForm1;

implementation

{$R *.DFM}

procedure TForm1.Button1Click(Sender: TObject);
const
dfi=pi/30;
var
i,
n,
r,
x01,y01,
x02,y02:integer;
fi:real;
p1,n1,
p2,n2:tpoint;
begin
with shape1 do
begin
r:=width div 5;
x01:=left+width div 4;
x02:=left+3*(width div 4);
y01:=Top+height div 4;
y02:=y01;
end;
n:=spinedit1.Value;
with progressbar1 do
begin
max:=n;
refresh;
show;
end;
fi:= 0;
p1.x:= x01;
p1.y:= y01- r;
p2.x:= x02;
p2.y:= y02- r;
for i:= 1 to n
begin
Progressbar1.Stepit;
fi:=fi+dfi;
n1.x:=x01- round(r*sin(fi));
n1.y:=y01- round(r*cos(fi));
n2.x:=x02- round(r*sin(fi));
n2.y:=y02- round(r*cos(fi));
with canvas.Brush do
begin
case (i div 256) mod 3 of
0: color:=RGB(i mod 256,0,0);
1: color:=RGB(0,i mod 256,0);
2: color:=RGB(0,0,i mod 256);
end;
canvas.Pie(x01- r,y01- r,x01+r,y01+r,p1.x,p1.y,n1.x,n1.y);
case (i div 256) mod 3 of
1: color:=RGB(i mod 256,0,0);
2: color:=RGB(0,i mod 256,0);
0: color:=RGB(0,0,i mod 256);
end;
canvas.pie(x02- r,y02- r,x02+r,y02+r,p2.x,p2.y,n2.x,n2.y);
end;
sleep(10);
p1:=n1;
p2:=n2;
end;
progressbar1.hide;
end;

end.

у меня делфи слово begin не нравиться....после этой строки for i:= 1 to n


 
Андрей Прокофьев ©   (2002-11-11 19:28) [1]

for i:= 1 to n do
begin



Страницы: 1 вся ветка

Текущий архив: 2002.12.02;
Скачать: CL | DM;

Наверх




Память: 0.47 MB
Время: 0.012 c
8-4520
vasya_dvc
2002-08-07 22:45
2002.12.02
Почему Photoshop не понимает?


14-4616
Бегинер
2002-11-12 19:33
2002.12.02
Excel


1-4317
asdf
2002-11-21 16:36
2002.12.02
Font.Style


14-4626
ION T
2002-11-12 22:49
2002.12.02
Число в н-ой степени


4-4670
AndyDN
2002-10-21 11:10
2002.12.02
Перехват ошибок в сервисе