Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 757079
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T15:19:14+00:00 2026-05-14T15:19:14+00:00

.NET newbie alert Using Visual C# 2008 Express Edition I have accidentally created a

  • 0

.NET newbie alert

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.

Deleting the following line from the Form1.Designer.cs file’s InitializeComponent() function…

this.btnCopy.Click += new System.EventHandler(this.btnCopy_Click);

… seems to do the trick, however, it makes me feel very dirty because of the following warning at the beginning of the #region:

/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.

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?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T15:19:15+00:00Added an answer on May 14, 2026 at 3:19 pm

    You do have to be careful when working in the designer.cs files but you don’t have to feel dirty about it (when I make the same mistake it is just easier to fix it the designer.cs file). You can do it visually like this:

    1. Open the form in the form designer.
    2. In the form designer, click the button of interest.
    3. Press F4 (or right click the button and then click properties). The properties pane should show up.
    4. At the top of the properties pane, click the lightning bolt. This shows the events for the button.
    5. Find the click event and clear its handler.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

.NET newbie here... I'd like to make a button in a Windows form that
.NET developers out there! Need your opinion here! I am now using Visual Assist
ASP.NET newbie here I have coded up an ASP.NET website and running on win'08
I'm .net newbie starting one project for fun. I'm using list box filled with
I'm an asp.net newbie. I have inherited a base of asp.net mvc code and
(MSSQL newbie alert) I have a number of databases on my machine, some were
I am a newbie to Net-SNMP, I want to implement a Subagent using Net-SNMP
I'm kind a newbie in .net stuff, however I'm developing a same project in
Newbie here...can I write one program which incorporates .NET LINQ and also various Java
Good morning, Apologies for the newbie question. I'm just getting started with ASP.NET internationalization

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.