I build a component class it extends a combo box and generates some random numbers. But when I drag and drop my component from the toolbox to a form it auto generates Me.Randtest1.Items.AddRange(...) in the Designer which uses static numbers. The idea was to have different numbers each time and not the same.
Imports System.Windows.Forms
Public Class randtest
Inherits ComboBox
Public Sub New()
setDefaultText()
fillComboBox()
End Sub
Private Sub setDefaultText()
Text = Rnd(10)
End Sub
Private Sub fillComboBox()
For count = 0 To 5
Items.Add(Rnd(10))
Next
End Sub
End Class
Thanks