How do I go to a webpage, load, then do some code?
<p>I've tried using <code>Sleep</code> but that just froze the program. Is it messing up because it's in the timer? I can get it to go to the site and not do code, but once I put other code it doesn't load properly.</p>

<p>I also tried putting code in:
<code>private void webBrowser1_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e)</code> but then I had even more problems.</p>

<pre><code>private void timer1_Tick(object sender, EventArgs e)
    {
        //code here

        if (click == null)
        {   
            webBrowser1.Url = new System.Uri("http://url.com", System.UriKind.Absolute);
            timer1.Stop();
            //load or wait x seconds
            timer1.Start();
        }
</code></pre>

<p>EDIT:
I'm trying to go from one page to the next and doing code once the page is loaded. If I put code in <code>webBrowser1_DocumentCompleted</code> it messes up the code before it. How do I add <code>DocumentCompleted</code> to only this one instance?</p>
