By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,417 Members | 1,178 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,417 IT Pros & Developers. It's quick & easy.

Inherited UserControls do not in appear in Toolbox (VB.NET 2005)

P: n/a
Dear Newsgroup,
I'm an old VB6.0 developper who switched some time ago to VB.NET 2005.
I really like that new Visual Studio. However, something is going wrong
now and I can't figure out, what it is...
I was playing around with UserControls which are inherited from
standard .NET controls to make myself some transparent controls.
Suddenly I realized that after bulding my project those UserControls do
not appear in the Toolbox anymore. I had before an error which caused
the designer to crash. I've searched MSDN, usenet and web. Uninstalled
..NET Framework 1.1, reinstalled VB.NET 2005 (Express). There seems to
be such a problem about .NET Studio 2003. However, I'm using 2005.
When I open an old project, my UserControls are still there and I can
add new ones. But it won't work in new projects.
Maybe I'm doing something terribly stupid, so I would like to describe
how I think UserControls should be generated. Am I overseeing
something?
1. Open new Windows Application project.
2. Add Class to Project.
3. E.g.:
Public Call1
Public Class ListBoxExtended
Inherits System.Windows.Forms.ListBox
Public Sub TestListBox
Msgbox "Test"
end sub
end class
end class
4. Compile/Build, no erros.
5. Going to Designer: just nothing, no "ListBoxExtended"

I'm really desperate in the meanwhile. Any hints and comments are
welcome.
Thanks a lot,
Bart

Apr 6 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Hello Newsgroup,
I have just found out that adding my EXE manually to the Toolbox solves
the problem. Can I switch it somehow on, that just after compiling the
UserControl appears automatically in the Toolbox?
What if I change the inherited UserControl? Do I have to recompile and
readd manually to update the controls on the form? Will I even have to
pull every control again on the form to get new functionality?
Thanks,
Bart (Desperate...)

Apr 6 '06 #2

P: n/a
I believe this is a bug in VB.Net 2003. I finally gave up on adding controls
to the toolbox and just add a reference then instantiate them and add them to
my forms in code. Maybe SP1 for VB.Net 2003 will resolve this bug.
--
Dennis in Houston
"b7******@yahoo.com" wrote:
Hello Newsgroup,
I have just found out that adding my EXE manually to the Toolbox solves
the problem. Can I switch it somehow on, that just after compiling the
UserControl appears automatically in the Toolbox?
What if I change the inherited UserControl? Do I have to recompile and
readd manually to update the controls on the form? Will I even have to
pull every control again on the form to get new functionality?
Thanks,
Bart (Desperate...)

Apr 6 '06 #3

P: n/a

<b7******@yahoo.com> wrote in message
news:11**********************@t31g2000cwb.googlegr oups.com...
Hello Newsgroup,
I have just found out that adding my EXE manually to the Toolbox solves
the problem. Can I switch it somehow on, that just after compiling the
UserControl appears automatically in the Toolbox?
What if I change the inherited UserControl? Do I have to recompile and
readd manually to update the controls on the form? Will I even have to
pull every control again on the form to get new functionality?
Thanks,
Bart (Desperate...)


I'm in the same VB6 boat that you are in. I have found that a UserControl
once compiled and placed in the toolbox, stays in the toolbox if you
"Rebuild". It's just the first time that you "Build"

GalenS


Apr 6 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.