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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T02:51:36+00:00 2026-06-03T02:51:36+00:00

The reason I am asking is that Visual Studio Express is missing this item

  • 0

The reason I am asking is that Visual Studio Express is missing this item when choosing “Add new Item”.

Because of that I would like to create it by hand but I do not know what code to add.

I would really appriciate if someone with professional or higher editions would paste the C# code that is generated when adding “Component Class”

SOLUTION

Use the code in the answer but to obtain visual part of the component, the user control has to be created and not just a regular class.

  • 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-03T02:51:37+00:00Added an answer on June 3, 2026 at 2:51 am

    The code part

    Component1.cs

    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Diagnostics;
    using System.Linq;
    using System.Text;
    
    namespace blabla
    {
        public partial class Component1 : Component
        {
            public Component1()
            {
                InitializeComponent();
            }
    
            public Component1(IContainer container)
            {
                container.Add(this);
    
                InitializeComponent();
            }
        }
    }
    

    EDIT:

    Component1.Designer.cs

    namespace blabla
    {
        partial class Component1
        {
            /// <summary>
            /// Required designer variable.
            /// </summary>
            private System.ComponentModel.IContainer components = null;
    
            /// <summary> 
            /// Clean up any resources being used.
            /// </summary>
            /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
            protected override void Dispose(bool disposing)
            {
                if (disposing && (components != null))
                {
                    components.Dispose();
                }
                base.Dispose(disposing);
            }
    
            #region Component Designer generated code
    
            /// <summary>
            /// Required method for Designer support - do not modify
            /// the contents of this method with the code editor.
            /// </summary>
            private void InitializeComponent()
            {
                components = new System.ComponentModel.Container();
            }
    
            #endregion
        }
    }
    

    But there’s a visual part that you will miss…

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

Sidebar

Related Questions

The reason I'm asking this is because there is a validation in OpenERP that
The reason I am asking this is due to my observation that frameworks like
The primary reason for asking how to do this is because I personally never
The reason I'm asking that is because requery() is deprecated. What is the best
The reason I am asking is that I am thinking of building a foot
The reason for me asking this question is:- I get a real buzz out
The reason I want to sign the dll is because I want to add
Visual Studio 2010 seems to insist on having this import in web application projects
The reason I'm asking is that I want to test something, that I expect
Is Drupal 6 supporting APC ? The reason I'm asking is that I've changed

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.