vincentnl Posted March 29, 2003 Posted March 29, 2003 I am usging VB .net I have a base form that has mustoverride 's and thus mustinherit in the class definition. Public MustInherit Class BasicForm Inherits System.Windows.Forms.Form If i inherit from this class Public Class SwitchBoard Inherits BasicForm The designer (the thing in the IDE that let's you edit in WYSIWYG mode on forms) gives an error, for it tries to make an instance of basicform. I know it is an abstract class, just inherit from it, and show my switchboardclass ! How can this be fixed or worked around? Is it clear what i am asking? Quote
*Gurus* divil Posted March 29, 2003 *Gurus* Posted March 29, 2003 Unfortunately the designers cannot support an abstract form as a base, because they have to actually create an instance of it to show on the design surface. Quote MVP, Visual Developer - .NET Now you see why evil will always triumph - because good is dumb. My free .NET Windows Forms Controls and Articles
vincentnl Posted March 29, 2003 Author Posted March 29, 2003 I agree, but isn;t it stupid !! This must have come up before !! Why design it that way, it is so obvious, and not easily missed, so MS must be aware of it Quote
*Gurus* divil Posted March 29, 2003 *Gurus* Posted March 29, 2003 And how would you suggest they instantiate your abstract class? :) Quote MVP, Visual Developer - .NET Now you see why evil will always triumph - because good is dumb. My free .NET Windows Forms Controls and Articles
vincentnl Posted March 29, 2003 Author Posted March 29, 2003 They trie to instantiate my abstract class when they want to display a derived class. They should only try to instatntiate the derived class, and just incorporate the data from its parent Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.