Progress bar in console application in Delphi?

Question:

I would like to display some kind of animation in my console application during a long process.

It could be a progress bar or another animation.

Answer:

Try it Like this: I saved this in a file because I was trying to do the same and it worked… I found this in a Forum at the time.

Var 
cont, Linhas : integer; 
Lista: TStringList; 
begin 
  try 
    Lista.LoadFromFile('C:\Cadastro.txt'); 
    Linhas:= Lista.Count; 
  finally 
    Lista.Free; 
  end; 
  ProgressBar1.Max := Linhas; //Envia p/ Progressbar o Tamanho Total do Arquivo de acordo com o numero de linhas pego com a Try acima...

This one is for Windows this one is for Console… See here

Scroll to Top
AllEscort