Reputation: 2520
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
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