title: Loop and Time Delay
body: <p>I've created a program which loads a webpage.
  Then I programmed 3 buttons which perform operations on the website. This functions fine.</p>
  
  <p>But now I want to implement a button which will click Button1 one time, then it should wait 5 sec and then a loop should start and hit Button2 10 times. After this, the whole process should start again. The program is kind of a bot.</p>
  
  <pre><code>Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
      Call Button1_Click(sender, e)
      Application.Wait(Now + TimeValue("0:00:10"))
  End Sub
  </code></pre>
  
  <p><code>Application.Wait</code> doesn't function because <code>Application</code> is not a member of <code>System.Windows</code> Forms.</p>
  
  <p>How can I implement the delay? How can I implement the loop?</p>