Форум АНТИЧАТ

Форум АНТИЧАТ (https://forum.antichat.xyz/index.php)
-   С/С++, C#, Delphi, .NET, Asm (https://forum.antichat.xyz/forumdisplay.php?f=24)
-   -   Delphi компонент Timer (https://forum.antichat.xyz/showthread.php?t=198938)

Sunstrider 24.04.2010 20:12

Delphi компонент Timer
 
PHP код:

ProgressBar1.position:=ProgressBar1.position   +10;
if 
ProgressBar1.position 100 then Showmessage ('you ');
Timer1.Enabled:=False

Прогрес бар на 10 ке зависает и все

Jaw 24.04.2010 20:14

Цитата:

Сообщение от Sunstrider
Прогрес бар на 10 ке зависает и все

Ему больше ничего не остается делать(

Код:

procedure TForm1.Timer1Timer(Sender: TObject);
begin
Timer1.Enabled := ProgressBar1.Position < ProgressBar1.Max;
ProgressBar1.Position := ProgressBar1.Position + 10;
if ProgressBar1.Position= 100 then
ShowMessage('you');
end;


Sunstrider 24.04.2010 20:16

Цитата:

Сообщение от Jaw
procedure TForm1.Timer1Timer(Sender: TObject);
begin
Timer1.Enabled := ProgressBar1.Position < ProgressBar1.Max;
ProgressBar1.Position := ProgressBar1.Position + 10;
if ProgressBar1.Position= 100 then
begin
ShowMessage('you');
end;
end;

спасибо помогло


Время: 15:17