I’ve tried using Sleep 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.
I also tried putting code in:
private void webBrowser1_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e) but then I had even more problems.
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();
}
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 webBrowser1_DocumentCompleted it messes up the code before it. How do I add DocumentCompleted to only this one instance?
First, it seems like ur approach is wrong,