Moving an event from one class to another
<p>I am trying to raise an event public void tmr_Tick (object sender, EventArgs e) in another class. I am new to programming and would appreciate any helpful comments as to why this isnt working!</p>

<p>I need to start class by clicking the page first loaded </p>

<pre><code>private void ButtonStart_Click(object sender, EventArgs e)
{
    wb.Navigate("http://www.yahoo.com");
}
</code></pre>

<p>at the expiration of the time passed to another page</p>

<pre><code>private void wb_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e)
{

    tms.method_1(5000);

}
</code></pre>

<p>full code and class </p>

<pre><code>using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Bot
{
    public partial class FormWindow : Form
    {
        TimerStart tms;

        public WebBrowser wb;
        public FormWindow()
        {
            wb = new WebBrowser();
            tms = new TimerStart(wb);
            InitializeComponent();
        }


        private void wb_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e)
        {

            tms.method_1(5000);

        }
        private void ButtonStart_Click(object sender, EventArgs e)
        {
            wb.Navigate("http://www.yahoo.com");
        }
    }
}
</code></pre>

<p>&nbsp;</p>

<pre><code>using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Bot
{
    public class TimerStart
    {
        Timer tmr;
        public WebBrowser wb;
        public TimerStart(WebBrowser wb)
        {
            tmr = new Timer();
            this.wb = wb;
            tmr.Tick += new EventHandler(tmr_Tick);
        }
        public void tmr_Tick(object sender, EventArgs e)
        {

            wb.Navigate("http://google.com");

        }
        public void method_1(int i)
        {
            tmr.Interval = i;
            tmr.Start();
            wb.Navigate("http://google.com");
        }

    }
}
</code></pre>
