title: How do I remove unused objects in Visual Studio?
body: <p>Just wondering, is there an easier way to remove control objects completely from a project? </p>
  
  <p>Let's say I put a button on a form and write some code to make the button do something. A few days later I decide I don't want this button anymore. I would just click delete on the form designer, but it leaves the variable name and onclick function in the .h and .cpp files (when programming in C++) or the onclick method (in C#). I would then have to go and find all traces of the button and delete the code manually. I want to know if there is a "one-click" solution for removing the button like the "one-click" method for creating (well, it's not exactly one click to generate the variable and method, but it's not having to visit more than one different place to make it work either).</p>