title: I can't repaint my form in Delphi
body: <p>I'm creating a Delphi program and i have this code in my program:</p>
  
  <pre><code>begin
    if edit1.Text='salam' then
    begin
      for i := 1 to 10 do
      begin
        progressbar1.Value := progressbar1.Value+1;
        sleep(100);
      end;
    end;
  end;
  </code></pre>
  
  <p>I wanna have the progressbar moving smoothly. But this code isn't like that.<br>
  What should i do? I wanna repaint the form after sleep.</p>