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 / WinForm General / February 2007

Tip: Looking for answers? Try searching our database.

vb.net usercontrol inheritance designer

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
marfi95 - 19 Feb 2007 16:50 GMT
I am trying to setup a usercontrol as a base class, so that I can
derive my usercontrols from it.

the base is pretty simple:

Imports System.Xml
Public Class usrBase
   Inherits System.Windows.Forms.UserControl

   Public Overridable Sub MethodA()
   End Sub
End Class

'derived classes
Public Class usrMyControl
     Inherits usrBase
...
...
End Class

The issue is that I can't see my form usrMyControl in the designer
anymore and gives an error that says " The designer must create an
instance of type 'usrBase' but it cannot because the type is declared
as abstract.".

However, I thought the class was only consider "abstract" when the
MustInherit/MustOverride clauses are used, which I'm not using them
here.  Why does it think it is still abstract ?

What am I doing wrong ?   Is there another way to do this ?

Mark
Marina Levit [MVP] - 19 Feb 2007 21:00 GMT
If this is literally the code you have, then I would attribute it to a
designer bug.

>I am trying to setup a usercontrol as a base class, so that I can
> derive my usercontrols from it.
[quoted text clipped - 28 lines]
>
> Mark
Tom Shelton - 20 Feb 2007 01:07 GMT
["Followup-To:" header set to microsoft.public.dotnet.languages.vb.]
> I am trying to setup a usercontrol as a base class, so that I can
> derive my usercontrols from it.
[quoted text clipped - 15 lines]
> ...
> End Class

Is this your exact code?  Something ins't right there....

Signature

Tom Shelton


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.