Home All Groups Group Topic Archive Search About

How to Create an Invisible User Control?

Author
27 Jan 2006 3:57 PM
Don
Is it possible to create a custom control that will show up in the toolbox
and can be dragged onto a form, but will appear in that special section at
the bottom of the form designer window where things like ImageList controls
go instead of on the form itself?  If so, how is it done?

- Don

Author
27 Jan 2006 4:07 PM
Armin Zingler
"Don" <unkn***@oblivion.com> schrieb
> Is it possible to create a custom control that will show up in the toolbox
> and can be dragged onto a form, but will appear in that special section at
> the bottom of the form designer window where things like ImageList
> controls go instead of on the form itself?  If so, how is it done?


You are looking for a 'component' instead of a control.

http://msdn.microsoft.com/library/en-us/cpguide/html/cpconclassvscomponentvscontrol.asp


Armin
Author
27 Jan 2006 4:14 PM
Cor Ligthert [MVP]
Author
27 Jan 2006 7:51 PM
Herfried K. Wagner [MVP]
"Don" <unkn***@oblivion.com> schrieb:
> Is it possible to create a custom control that will show up in the toolbox
> and can be dragged onto a form, but will appear in that special section at
> the bottom of the form designer window where things like ImageList
> controls go instead of on the form itself?  If so, how is it done?

Instead of inheriting from 'System.Windows.Forms.UserControl' let your class
inherit from 'System.ComponentModel.Component'.

--
M S   Herfried K. Wagner
M V P  <URL:http://dotnet.mvps.org/>
V B   <URL:http://classicvb.org/petition/>