在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
在implementation加入下面 uses Gauges; var Gauge1: TGauge; 加入Timer1控件,设为false procedure TForm1.Button1Click(Sender: TObject); var form2: TForm; begin form2 := TForm.Create(nil); form2.BorderStyle := bsNone; form2.Width := 360; form2.Height := 30; form2.Position := poMainFormCenter; Gauge1 := TGauge.Create(form2); Gauge1.MinValue := 0; Gauge1.MaxValue := 100; Gauge1.Width := form2.ClientWidth - 2; Gauge1.Height := 30; Gauge1.Left := 10; Gauge1.Top := (form2.ClientHeight - Gauge1.Height) div 2; Gauge1.Parent := form2; Timer1.Interval := 100; Timer1.Enabled := True; form2.ShowModal; form2.Free; Timer1.Enabled := False; end; procedure TForm1.Timer1Timer(Sender: TObject); begin if Assigned(Gauge1) then begin Gauge1.Progress := Gauge1.Progress + 1; if Gauge1.Progress = Gauge1.MaxValue then TForm(Gauge1.Parent).ModalResult := 1; end; end;
|
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论