title: Winforms - Visually remove button click event
body: <p><em>.NET newbie alert</em></p>
  
  <p>Using Visual C# 2008 Express Edition I have accidentally created a click event for a button.  I then deleted the automatically-created method code, which resulted in an error saying that the function, which had now been referenced in the form loading code, could no longer be found.</p>
  
  <p>Deleting the following line from the <code>Form1.Designer.cs</code> file's <code>InitializeComponent()</code> function...</p>
  
  <pre><code>this.btnCopy.Click += new System.EventHandler(this.btnCopy_Click);
  </code></pre>
  
  <p>... seems to do the trick, however, it makes me feel very dirty because of the following warning at the beginning of the #region:</p>
  
  <pre><code>/// Required method for Designer support - do not modify
  /// the contents of this method with the code editor.
  </code></pre>
  
  <p>I haven't been able to find a way to do this using the form designer, which I assume is the means implied by this warning.  What is the correct way to do this?</p>