Form1
Public Class Form1
Private Sub But_Bell_Click(sender As System.Object, e As System.EventArgs) Handles But_Bell.Click
MessageBox.Show("Ding a ling")
End Sub
End Class
First Decendant
Public Class BellsAndWhistles
Inherits Form1
Friend WithEvents But_Whistle As System.Windows.Forms.Button
Private Sub InitializeComponent()
Me.But_Whistle = New System.Windows.Forms.Button()
Me.SuspendLayout()
'
'But_Whistle
'
Me.But_Whistle.Location = New System.Drawing.Point(112, 38)
Me.But_Whistle.Name = "But_Whistle"
Me.But_Whistle.Size = New System.Drawing.Size(75, 23)
Me.But_Whistle.TabIndex = 1
Me.But_Whistle.Text = "Whistle"
Me.But_Whistle.UseVisualStyleBackColor = True
'
'BellsAndWhistles
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.ClientSize = New System.Drawing.Size(292, 273)
Me.Controls.Add(Me.But_Whistle)
Me.Name = "BellsAndWhistles"
Me.Text = "Bells & Whistles"
Me.Controls.SetChildIndex(Me.But_Whistle, 0)
Me.ResumeLayout(False)
End Sub
Private Sub But_Whistle_Click(sender As System.Object, e As System.EventArgs) Handles But_Whistle.Click
MessageBox.Show("Toot Toot")
End Sub
End Class

Second Descendant
Public Class MoreBellsAndWhistles
Inherits BellsAndWhistles
Friend WithEvents MoreBells As System.Windows.Forms.Button
Private Sub InitializeComponent()
Me.MoreBells = New System.Windows.Forms.Button()
Me.SuspendLayout()
'
'MoreBells
'
Me.MoreBells.Location = New System.Drawing.Point(30, 145)
Me.MoreBells.Name = "MoreBells"
Me.MoreBells.Size = New System.Drawing.Size(75, 23)
Me.MoreBells.TabIndex = 1
Me.MoreBells.Text = "More Bells"
Me.MoreBells.UseVisualStyleBackColor = True
'
'MoreBellsAndWhistles
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.ClientSize = New System.Drawing.Size(292, 273)
Me.Controls.Add(Me.MoreBells)
Me.Name = "MoreBellsAndWhistles"
Me.Text = "MoreBellsAndWhistles"
Me.Controls.SetChildIndex(Me.MoreBells, 0)
Me.ResumeLayout(False)
End Sub
Private Sub MoreBells_Click(sender As System.Object, e As System.EventArgs) Handles MoreBells.Click
MessageBox.Show("Ting TIng")
End Sub
Private Sub MoreBellsAndWhistles_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
End Sub
End Class

Where has the whistle button gone?
The class part of the inheritance has works because you can access it via code.
Try calling
MyBase.InitializeComponent()from the second descendant. You’ll probably have to change the access level of it, too.EDIT
This was bugging me all night. It turns out that its a case of missing constructors. If you use reflector you’ll see that
Form1has a constructor that callsMe.InitializeComponent()even though that doesn’t exist in eitherForm1.vborForm1.Designer.vb.If you create a C# WinForms app the constructor is visible so this makes me think its a VB thing to hide it. Also, if you manually add a
Sub NewtoForm1it will fill in some code for you, essentially “unhiding it”.I’m guessing that VS looked at your code and realized that it was a descendant of
System.Windows.Forms.Formbut technically it was done improperly since it didn’t callMyBase.New()(since it couldn’t because it didn’t exist) so it was just trying to guess. It “knows” to add a call toInitializeComponent()in the form that it created and it “knows” to do that for the form that you’re looking at but it isn’t bothering to walk the chain of forms and do it for all of them. Bug? Maybe.When you set
MoreBellsAndWhistlesas a startup form you never see either of the new buttons, right? This is how you can tell its more of a VS trickery involved.Anyway, the solution to the entire problem is to add this to both sub classes:
And add this to
Form1: