Public Function AddNewButton() As System.Windows.Forms.Button
' Create a new instance of the Button class.
Dim aButton As New System.Windows.Forms.Button()
' Add the button to the collection's internal list.
Me.List.Add(aButton)
' Add the button to the controls collection of the form
' referenced by the HostForm field.
HostForm.Controls.Add(aButton)
' Set intial properties for the button object.
aButton.Top = Count * 25
aButton.Left = 100
aButton.Tag = Me.Count
aButton.Text = "Button " & Me.Count.ToString
Return aButton
End Function