User999999
User999999

Reputation: 2520

Visual Studio 2010: Constructor on type '###' not found

I'm trying to put inhertance in my usercontrols but the designer is constantly giving me the error:

 Constructor on type "###" not found
 ### here is name of my parent usercontrol:

No other errors are being shown. I've tried any of the following solutions offered on MSDN:

For whom it may concern, the constructors:

Child (Type= Windows.forms.Usercontrol):

Public Class UC_Url
    Inherits Master

    Public Sub New(ByVal meter As UMeter)
         MyBase.New(meter)
        ' This call is required by the designer.
        InitializeComponent()
        ' Add any initialization after the InitializeComponent() call.
   End Sub

End Class

Parent (Type= Windows.forms.Usercontrol):

Public Class Master
     Implements ICloneable

     Public Sub New(ByVal meter As AMeter)

          ' This call is required by the designer.
          InitializeComponent()
          lblName.Text = meter.Caption
      End Sub

End Class

Note: UMeter (Child) inherits AMeter

Other posts on SO regarding this issue haven't helpen me sofar.

Question: Anyone has any experience handling this?

Thnx

Upvotes: 0

Views: 3013

Answers (1)

Olivier Jacot-Descombes
Olivier Jacot-Descombes

Reputation: 112682

The argument should be the variable meter not the type UMeter:

Public Sub New(ByVal meter As UMeter)
     MyBase.New(meter)
...

Upvotes: 1

Related Questions