Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / Design Time / February 2006

Tip: Looking for answers? Try searching our database.

Subclassed control issues

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
CJM - 17 Feb 2006 15:42 GMT
I'm currently working on an assembly that has both forms and controls
in it.

When I create a new control based on UserControl and compile, it shows
up in the toolbox for all forms in this assembly.

When I create a subclassed control (from label in this case), it does
not show up in the toolbox.

I understand you can add it through Add/Remove Items... but then I'm
adding a reference to itself and I get all kinds multiple declaration
errors. I also understand that you can remove the reference after
you're done designing and it all works. This, however, is a pain
because the reference gets added everytime you add the control to a
form. I could deal with this but this control needs to be distributed
within the company to 30 - 50 other developers.

How do I see subclassed controls in the toolbox for the current
assembly without adding a reference to itself?

Addition: Even when you remove the reference, the assembly stays
in memory once the designer has been opened. I have to shut down VS and

open again to do a full compile.

Thanks,

Corey.
jokiz - 20 Feb 2006 04:32 GMT
this is a very common scenario and i suggest you separate the control
assembly from your windows forms UI project.  it will also help you
debug your controls easily.  As you've said, you want the control
package to be distributed in the company, so it should really be in a
separate assembly.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.