title: c# button calling several methods
body: <p>I am working on an app that will do a browser search across several search engines. I am currently setting up the interface and this is my code:</p>
  <pre><code>namespace OIT
  {
      public partial class Form1 : Form
      {
          public Form1()
          {
              InitializeComponent();
          }
   
          private void Form1_Load(object sender, EventArgs e)
          {
  
          }
  
          public void TestButton(object sender, EventArgs e)
          {
              Process proc = new();
              proc.StartInfo.UseShellExecute = true;
              proc.StartInfo.FileName = &quot;https://google.ca/search?q=&quot; + GoogleTextBox.Text;
              proc.Start();
          }
  
  
          public void DuckDuckGo_Click(object sender, EventArgs e)
          {
              Process proc = new();
              proc.StartInfo.UseShellExecute = true;
              proc.StartInfo.FileName = &quot;https://duckduckgo.com/?q=&quot; + DDGTextBox.Text;
              proc.Start();
          }
  
          private void SearchAll_Click(object sender, EventArgs e)
          {
              if (GoogleTextBox.Text + DDGTextBox.Text == &quot;&quot;) 
              {
                  MessageBox.Show(&quot;Please enter search terms.&quot;);
              }
              else
              {
                  TestButton();
                  DuckDuckGo_Click();
              }
            
          }
  
      }
  }
  </code></pre>
  <p>The issue is the <code>testbutton()</code> and <code>duckduckgo_click();</code> methods at the button are causing argument errors:</p>
  <blockquote>
  <p>Error CS7036<br />
  There is no argument given that corresponds to the required formal parameter 'sender' of 'Form1.TestButton(object, EventArgs)'</p>
  </blockquote>
  <p>Anyone able to help me out with this? I'm sure it's a super simple fix but I've done through all the similar questions and I can't figure it out.</p>
  <p>Thanks!</p>