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

  • SEARCH
  • Home
  • 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 8474863
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T17:44:21+00:00 2026-06-10T17:44:21+00:00

I imagine this question has been asked and answered, but I cannot find it.

  • 0

I imagine this question has been asked and answered, but I cannot find it.

I wanted to make a simple GUI to interface to a windows 7 command. I usually use Wx, but since this was to be a windows-only thing, I decided to see if I could whip it out real fast using Visual C# 2010 Express, which I had never used before.

Things started off just great. I created a form, put a few buttons and text boxes and such on it, and hit Debug. It came up and ran just like that. No muss, no fuss. So I then designed the form just the way I wanted it, renamed the controls from “Button1” and so forth to meaningful names. But now it’s a mess. By clicking around, I discovered that VC# had auto-generated two files called Form1.cs and Form1.Designer.cs. The later contains the bindings between functions and the events generated from user-clicks etc., and the former contains no-op code for those functions, for me to complete.

Problem is, the names are all still the original “Button1” and so forth, not the new ones, and the new controls I added after running the first time do not appear at all.

I want it to regenerate all that stuff afresh from the finished form. How to?

  • 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-06-10T17:44:23+00:00Added an answer on June 10, 2026 at 5:44 pm

    You probably don’t have an actual problem, unless you edited something within Form1.Designer.cs. Provided you left that file alone, things should just work.

    Whenever you double-click on a button, or use the events interface to create event handlers, the handlers are created with the following pattern:

    ObjectName_EventName()
    

    So, for example:

    Button1_Click()
    

    If you later change the name of Button1, the event handler’s name is not changed, too. But it is still attached to the proper event, again – assuming you did not edit anything in Form1.Designer.cs

    If you look (but don’t touch!) inside Form1.Designer.cs, you will probably find something similar to:

    MyNewButtonName.Click += Button1_Click;
    

    (I don’t recall the exact syntax the editor uses for wiring up event handlers; the principle is you should see your new button name being attached to the old handler name)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I could imagine this question has already been asked, but I actually could not
I imagine this is a question that has been asked a thousand times but
Hey guys, I don't know if this question has been asked yet but imagine
I imagine this question has been asked before (hasn't every question?), but I am
I imagine this has been asked many times but I am having problems with
First, I know this question has been asked several times before and that in
You're probably thinking this has been asked a million times before but I think
I would imagine this might use Reflection.Emit, but a similar question on SO only
This is probably a silly question, but here it goes.Imagine you have the following
This question has been on my mind ever since I started with iOS development:

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.