Inherited controls don't appear in toolbox

  • Thread starter Thread starter Adam Nowotny
  • Start date Start date
A

Adam Nowotny

I've created a user control:

Public Class Button
Inherits System.Windows.Forms.UserControl

(at this point VS added this to toolbox on my computer) and then changed
MANUALLY (is there any other way to inherit from built-in controls?) to:

Public Class Button
Inherits System.Windows.Forms.Button

Now such controls don't show up in the toolbox when i open the project on
another computer :/

I can add it with "add/remove items..." by pointing to a COMPILED version of the
project...but is this really the same ?
 
Adam,

The controls added to the Toolbox does not come from the loaded projects.
Think about it, if you had installed a third-party product such as the
controls from Infragistics and then someone else without a valid license to
these controls opened up your project in his or her machine and could use
these controls. There's more to it than that, especially the use of license
keys, but essentially controls in the toolbox are specific to the machine on
which your VS .NET setup exists.
 
Adam Nowotny said:
I've created a user control:

Public Class Button
Inherits System.Windows.Forms.UserControl

(at this point VS added this to toolbox on my computer) and then
changed MANUALLY (is there any other way to inherit from built-in
controls?) to:

Public Class Button
Inherits System.Windows.Forms.Button

Now such controls don't show up in the toolbox when i open the
project on another computer :/

I can add it with "add/remove items..." by pointing to a COMPILED
version of the project...but is this really the same ?


Unfortunatelly, only controls derived from Usercontrol automatically appear
in the toolbox. I also wish all my controls are there, but instead we have
to manually add them. This is not only more work, it is annoying because
then the controls are also in the toolbox in other projects. The way it
works with Usercontrols is much better, IMO. :-(


--
Armin

How to quote and why:
http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html
 
Armin said:
Unfortunatelly, only controls derived from Usercontrol automatically appear
in the toolbox. I also wish all my controls are there, but instead we have
to manually add them. This is not only more work, it is annoying because
then the controls are also in the toolbox in other projects. The way it
works with Usercontrols is much better, IMO. :-(

So i guess adding it manually should be ok. Thanks

It still bothers me...:) What is the difference (except for the icons ;))
between usercontrol added automatically by VS and the "same" user control added
manually through "add/remove items" (by pointing to an already compiled DLL) in
the toolbox ?
 
Back
Top