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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T05:06:43+00:00 2026-06-12T05:06:43+00:00

When I create an empty project in Visual Studio there is a Form1.cs which

  • 0

When I create an empty project in Visual Studio there is a Form1.cs which contains the Subfiles Form1.designer.cs and Form1.resx.

When I download some sample code e.g. from CodeProject very often the Designer.cs isn´t there and the code of the designer is included in the Form1.cs. I tried to make it like this, but I just get an error of Visual Studio when I want to view the Form1.cs[Design] tab.

How can I achieve that the designer code is in the Form1.cs and not in a seperate file?

Addition:
Visual Studio creates my solution file in the project folder and the project files in the subfolders. In the sample codes often all files are in the same directory.

How may I achieve that?

Addition:
Here is a link to a sample Main.cs where the designer code is integrated to the
Main.cs

  • 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-12T05:06:45+00:00Added an answer on June 12, 2026 at 5:06 am

    Just cut and paste the code from Form1.Designer.cs to Form1.cs

    Both Form1.Designer.cs and Form1.cs implements the class Form1. They use the keyword partial to split the declaration in two files. The reason is to separate the designer generated code from the code you write manually.

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

Sidebar

Related Questions

Is there a way to have an empty Project in Visual Studio 2008 or
Whenever I create a new Empty MVC3 Web Application project in Visual Studio 2010
Is there an easy way to copy a project in Visual Studio 2010 ?
I created an empty C# Project in Visual Studio, and added a class. Then
I created an Empty Project in Visual C++, but now I need the Console
For a new project I have created a local folder tree with empty Visual
Is there an elegant way to create an empty jquery element (versus null) ?
I am trying to create a singleton which has a non-empty constructor and to
I have Visual Studio 2010 with SP1 installed. I want to create a simple
I would like to do some C development in Windows environment using Visual Studio

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.