Dear All,
I am beginner in c sharp and now I am confused.
Usually I just add an item to form 1 (or the main form) just by dragging and dropping from the toolbox. I realized that I want to make a button, lets say the name is status button. And I want to make the status button inheritance. So I put status button inside a class called buttonStatus.cs
I am now configuring how to put this button to Form 1. I tried all over by duplicating the code inside the Form 1 designer, putting it inside the buttonStatus constructor, and called the constructor when form1 loads..
, but nothing appears at form 1. There should be a code to add the button to the form 1, while my code what I copied is mostly the button's parameters.
Any answer is welcome. Please help me with this issue.

1 answers
If you've made a custom button using code such as this in buttonStatus.cs:
then, if you simply build the project (don't run it yet), you should see ButtonStatus added at the top of the ToolBox when you switch to design mode.
All you need to do then is to drag it onto the form and set your properties and events in the usual way. VS will add the appropriate code to the Form class and it's InitializeComponent() as it does for a standard Button.
answered one year ago by:
17279
301
Ah nice vulpes! That one is quick and good.. I also figured out something cool to add things during runtime by using: Controls.Add()
17279
That's right. Controls added at runtime won't become visible until you've added them to the form's Controls collection. When you add them at compile time, you'll see that VS does this for you if you open up the InitializeComponent() method in Form1.Designer.cs.