I ve always had a problem with this but never coped with it.
Let s say I bring a button to a form and click on it two times
a event will appeaer in the code section.
EXAMPLE:

private void button1_Click(object sender, EventArgs e)
        {

        }

Let s say i want to remove the BUTTON and the event by erasing them manually.
After that i get plenty of warnings wich is reasonable. Just wanted to ask how
do i do this safely or is there anything else i would have to erase in order to
avoid warnings...

If you don't add any code to the event handler, simply resetting it in the control properties will delete the code as well. If you do add code (even if you delete it immediately), the best approach is to delete the handler manually and also reset it in the control properties.

If you want to go full manual, you can find where the handler is attached in your compiler generated code and remove that rather than do it from the designer.

commented: TNX! +3
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.