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 1101049
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T00:58:38+00:00 2026-05-17T00:58:38+00:00

When you open a new C# Windows Forms Application project in Visual Studio 2008,

  • 0

When you open a new C# Windows Forms Application project in Visual Studio 2008, you get a lot of autogenerated code (AssemblyInfo.cs, Resources.Designer.cs, Settings.Designer.cs, Form1.Designer.cs, Form1.resx, Program.cs).

Beside adding components from the Toolbox to Form1.cs[Design] and code to Form1.cs, what files can you change? And how? And what files should be left as they are?

PS: This is a vast subject, as far as I can tell. I don’t expect an exhaustive answer. Any information you care to share will do. I also want to mention that I’m a C# beginner and only want the most basic information.

PPS: In case you’re thinking about answering “Search the internet” or something like that, don’t. I have searched the internet and will do so again and again until I find the answers I’m looking for. I have found some useful information, but I feel I need more. I think it’s likely I will get that at stackoverflow.com.


Update 1: This question has been answered. I’ve marked the answer from sh_kamalh as accepted. I would like to mark the answers from David and Hans Passant as accepted as well, but I don’t think you can mark more than one answer as the accepted one. Or can you?

From what I can dedcue from the answers, you should never change the autogenerated code in a C# Windows Forms Application project in Visual Studio 2008. I don’t understand everything in the answers, though, and may have overlooked something.

If you don’t agree with the summary right above or the answers below, feel free to add a contradictory answer. Or if you have an answer that supplement the answers below, feel free to add that answer. I’m sure there’s more to be said on this subject.


Update 2: It seems you can also write your own version of a C# Windows Forms Application project (see Davids answer below, which I forgot about when I wrote “Update 1”). It also seems you should start from scratch if you do.

  • 1 1 Answer
  • 2 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-17T00:58:38+00:00Added an answer on May 17, 2026 at 12:58 am

    Why do you want to change the auto-generated files?
    In case of forms you should not change .Designer.cs or the .resx files because they will be generated everytime you change the form so whatever changes you do will be overwritten next time the code is regenerated.
    If you want to change something in Designer.cs, you can do that change in the original cs file because the class is marked as partial which means that the code from the files Form1.cs and Form1.Designer.cs is combined to generate the final code.
    If you want to add your resources add a resource file and leave the generated .resx file intact.
    For AssemblyInfo.cs you can change the general information of the assembly.

    Long story short just leave the generated files intact.

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

Sidebar

Related Questions

I have a Windows Forms application that was created in Visual Studio 2008 and
I started a new project with type of Windows Forms application, and I put
I have a .net windows forms application that needs to open directly to the
This morning I stumbled over a weird issue in Visual Studio's Windows Forms designer.
I have an MDI Windows Forms application (.net 2008) that allows the user to
When you create a new Windows Forms application, what's the easiest way from dropping
System.Windows.Forms.WebBrowser wb = new System.Windows.Forms.WebBrowser(); wb.DocumentStream = new FileStream(C:\a.html, FileMode.Open, FileAccess.Read); while (wb.ReadyState !=
I am new to visual studio.I have created a simple console application and then
In my windows forms application, I close one form and open another like this:
I'm writing a new Windows Forms 2.0 application. This application is going to have

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.