Inheriting from a Windows Forms Control with Visual Basic

Hi

I'm following the steps listed in the following microsoft document for adding a windows form control:

http://msdn.microsoft.com/en-us/library/w2a8y03d.aspx

When I get to the following step:

To add your control to the form

    In Solution Explorer, right-click Form1.vb and choose View Designer from the shortcut menu.

    In the Toolbox, click ValueButtonLib Components. Double-click ValueButton.

    A ValueButton appears on the form.


I can't see the ValueButtonLib Components in the toolbox!

What am I doing wrong?

John
IssacJonesAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

nepaluzCommented:
You've missed step 2!
0
nepaluzCommented:
Actually, you need to compile the project before the control appears in the toolbox.
0
IssacJonesAuthor Commented:
Step 2?

I have followed all the steps and compiled everything and I still can't see it in the toolbox
0
Exploring SQL Server 2016: Fundamentals

Learn the fundamentals of Microsoft SQL Server, a relational database management system that stores and retrieves data when requested by other software applications.

nepaluzCommented:
Any user controls that are added in code will appear at the top of the toolbox after you have compiled the project. You have most definitely missed a step in the process!
0
Éric MoreauSenior .Net ConsultantCommented:
which version of VB.Net are you using? I know that some things changed over versions.
0
IssacJonesAuthor Commented:
Visual Basic 2010
0
Éric MoreauSenior .Net ConsultantCommented:
are both your project (control and form) in the same solution?
0
IssacJonesAuthor Commented:
yes
0
Éric MoreauSenior .Net ConsultantCommented:
it is working for me exactly like they explain. are you sure you have added a reference to your control project like explained in the "To create a test project" section
0
IssacJonesAuthor Commented:
hi - strange. The only think I have done differently is that I have added a TextBox rather than a button. I'm assuming that it is still a control so it shouldn't make a difference. Apologies for not pointing that out first if it is the cause.

Yes, I have added a reference and I can see it in the Solution Explorer for the main project.
0
Éric MoreauSenior .Net ConsultantCommented:
I just changed the button for a textbox and it is still working.

do you have any compile error?

why not scrap your project and start a brand new solution.
0
Jacques Bourgeois (James Burger)PresidentCommented:
There is a property in Tools...Options...Windows Forms Designer that says AutoToolboxPopulate. This should be set to True.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
IssacJonesAuthor Commented:
Genius!!!!

Yes, that did it. I wonder why it isn't set to true by default!!!!

Many, many thanks.

Thanks also to the other guys!
0
Jacques Bourgeois (James Burger)PresidentCommented:
It is set to True by default. That is why all the other experts did not spot the problem. You probably changed it by mistake at some point.
0
IssacJonesAuthor Commented:
Nope. I can guarantee I didnt change it. This was a fresh install of visual studio 2010 from a few days ago and I've been nowhere near those settings!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic.NET

From novice to tech pro — start learning today.