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 / March 2005

Tip: Looking for answers? Try searching our database.

Repost for Microsoft: Designer not activated when designing Inheri

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Robin Sanner - 10 Mar 2005 17:15 GMT
I am trying to get this posted on the MSDN Universal account but have been
unsuccessful so far and have yet to receive an answer to this.  Is this
appearing under a MSDN Universal account?

Using the following:

<Designer("MyNamespace.MyDesigner, MyAssembly")> _
Public Class BaseControl
   Inherits UserControl
End Class

Public Class DerivedControl
   Inherits BaseControl
End Class

Public Class MyDesigner
   Inherits ParentControlDesigner

   Public Overrides Sub Initialize(ByVal component as IComponent)
       MyBase.Initialize(component)
       System.Diagnostics.Debugger.Break()
   End Sub
End Class

I have the Debugger.Break in the designer Initialize method so that I know
when it activates.

If I drop a BaseControl toolbox item on a form the designer activates fine.
If I drop a DerivedControl toolbox item on a form the designer activates
fine.

My problem is that I want to design DerivedControl directly (not after it's
been dropped on a form), however if I just open the UI view of
DerivedControl the designer is never activated.  The DerivedControl should
inherit the designer from BaseControl but just in case I also tried adding
the same <Designer> attribute onto DerivedControl with no success.

What is the problem here?

Thank you.

Robin Sanner
robins@interknowlogy.com
joeycalisay - 11 Mar 2005 02:00 GMT
Your custom designer will not be used when your custom usercontrol is being
designed.  VS uses IRootDesigners when design view is being uses, and using
reflector I can only see FormDocumentDesigner (used by forms) and the
UserControlDocumentDesigner (used by usercontrols).

Signature

Joey Calisay
http://spaces.msn.com/members/joeycalisay/

> I am trying to get this posted on the MSDN Universal account but have been
> unsuccessful so far and have yet to receive an answer to this.  Is this
[quoted text clipped - 39 lines]
> Robin Sanner
> robins@interknowlogy.com

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.