vb.net usercontrol inheritance designer

  • Thread starter Thread starter marfi95
  • Start date Start date
M

marfi95

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
 
If this is literally the code you have, then I would attribute it to a
designer bug.
 
["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.

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

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