How to add controls created by me in Visual Studio Toolbox?

Asked

Viewed 140 times

-2

I created a control for WinForms. But I can’t find my control on Toolbox.

How can I add my control to Toolbox?

  • @jbueno I think you were right not to tag c#. The check can be done on VB.Net for example. There is no language associated with the question in this case.

  • Exactly. That’s why I removed.

  • The votes who explain how I can improve my question.

  • It wasn’t me who voted negative, but I adjusted your publication to get a little better.

  • @jbueno Thanks :)

  • Bruno, your question is a little confused. I only really understood what I wanted after reading the answer.

  • In fact, the question alone is not possible to answer it, it is even possible by looking at the answer, but it has already been answered, that is, it does not seem to be a question. I reopen if the question gets in a way that everyone can answer, at the moment it is not clear.

  • @Bigown Hope you’re feeling better now

  • @Not brunocosta, taking information does not make the question clearer. The problem is that we can only understand what you actually want to do by reading the answer. I’m sure it’s clear in your head, it helps to stay clear by reading the answer, but the question does not give all the information necessary for the person who wants and understands the subject can answer.

  • @bigown What other information would you need to answer the question?

  • @Brunocosta If only you put "How to create a custom button in Windowns Forms and add it to the Visual Studio Tolbox bar?" would be simpler to understand.

  • @Brunocosta do not know, I read it I do not understand what is necessary to do there. When I read the original answer, then I could understand what I wanted, but only with her I could understand. I understand the intention, but it was not clear what the problem is. Maybe an image would have helped, not that I need it, but it’s a way to compensate for the lack of better text, there’s a lot of questions that are saved because of this. Since you already knew the answer, think about doing it in a way that you didn’t know, which you would need to put in place for people to understand, without giving the answer?

  • @bigown Being very honest I no longer know what it takes. I’ve already been able to help a user and that’s all I wanted. If the decision of the community is to close the question...

  • @Randrade Eu Gradeco a sugestao Randrade. The problem is that in your point of view this is the ideal question. It does not mean that it is for other people. Another problem is that it was Victor who took the trouble to ask the question in this way and not me...

  • @Brunocosta So I just gave a question suggestion, did not say it was to do exactly the same. However, there are 188 questions with a similar text on Soen, so I don’t think it’s just my point of view. However, I understand what you’re talking about.

Show 10 more comments

1 answer

1


Do your control (minimum example):

class BotaoTransparente : Button
{
    public BotaoTransparente()
    {
        BackColor = Color.Transparent;
    }
}

In visual studio 2015 the controls are automatically added when building the project:

You have to build the project. To build the project, click the right mouse button on the project and select build

inserir a descrição da imagem aqui

To find Toolbox go to View -> Toolbox

inserir a descrição da imagem aqui

When you are drawing your shape look for your control and drag it to the form:

inserir a descrição da imagem aqui

Browser other questions tagged

You are not signed in. Login or sign up in order to post.