Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Inheriting from a Windows Forms Control with Visual Basic

Posted on 2012-03-10
15
Medium Priority
?
208 Views
Last Modified: 2012-03-10
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
0
Comment
Question by:IssacJones
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 4
  • 3
  • +1
15 Comments
 
LVL 17

Expert Comment

by:nepaluz
ID: 37704999
You've missed step 2!
0
 
LVL 17

Expert Comment

by:nepaluz
ID: 37705003
Actually, you need to compile the project before the control appears in the toolbox.
0
 

Author Comment

by:IssacJones
ID: 37705044
Step 2?

I have followed all the steps and compiled everything and I still can't see it in the toolbox
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 17

Expert Comment

by:nepaluz
ID: 37705055
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
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 37705083
which version of VB.Net are you using? I know that some things changed over versions.
0
 

Author Comment

by:IssacJones
ID: 37705109
Visual Basic 2010
0
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 37705135
are both your project (control and form) in the same solution?
0
 

Author Comment

by:IssacJones
ID: 37705144
yes
0
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 37705164
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
 

Author Comment

by:IssacJones
ID: 37705179
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
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 37705248
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
 
LVL 40

Accepted Solution

by:
Jacques Bourgeois (James Burger) earned 1600 total points
ID: 37705436
There is a property in Tools...Options...Windows Forms Designer that says AutoToolboxPopulate. This should be set to True.
0
 

Author Closing Comment

by:IssacJones
ID: 37705525
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
 
LVL 40
ID: 37705642
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
 

Author Comment

by:IssacJones
ID: 37705784
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

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

1.0 - Introduction Converting Visual Basic 6.0 (VB6) to Visual Basic 2008+ (VB.NET). If ever there was a subject full of murkiness and bad decisions, it is this one!   The first problem seems to be that people considering this task of converting…
It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…

715 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question