title: Display a ProgressBar when I perform a query
body: <p>To display a ProgressBar when I perform a query, I use this code:</p>
  
  <pre><code>if not Query1.Prepared then
    Query1.Prepare;
  Query1.Open;
  
  ProgressBar1.Max := Query1.RecordCount;
  
  ProgressBar1.Min := 0;
  ProgressBar1.Position := 0;
  Query1.First;
  while not Query1.Eof do
  begin
    ProgressBar1.Position := ProgressBar1.Position+1;
    ProgressBar1.StepIt;           
    Query1.Next;
    Application.ProcessMessages;
  end;   
  </code></pre>
  
  <p>But the display of the ProgressBar remains frozen (I do not see the progress of the ProgressBar).</p>
  
  <p>How do I view the progress of ProgressBar1 when I perform this query?</p>