delphi 进度条

xiaoxiao2021-02-28  7

delphi 进度条控件的简单使用 新建一工程,在form上添加一个 ProgressBar1和一个Button,为Button单击事件写如下代码:   procedure   TForm1.Button1Click(Sender:   TObject);     var   i:integer;     begin         ProgressBar1.Min:=0;     ProgressBar1.Max:=100;         for   i:=1   to   100   do             begin                 ProgressBar1.Position:=i;                 Application.ProcessMessages;                 sleep(10);             end;     end; 按F9,点击Button运行后可以看到效果。

转载请注明原文地址: https://www.6miu.com/read-200162.html

最新回复(0)