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.
HostStorePanel.Controls.Add(aButton)
‘ Set intial properties for the button object.
‘ aButton.Top = Count * 25
‘ aButton.Left = 100
aButton.Location = New Point(x, y)
aButton.Size = New Size(130, 45)
aButton.BackgroundImage = Image.FromFile(buttonImage)
aButton.Tag = “2008″ ‘”Here I put 2008 as The value of this button. so after the button is click we can get the value of the button.
aButton.Text =” What ever you want”