Using the Form Designer, simply drag a ComboBox onto your form. This will by default called "ComboBox1"
In the Load event for the page, you could include:
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
ComboBox1.Items.Add("One")
ComboBox1.Items.Add("Two")
ComboBox1.Items.Add("Three")
ComboBox1.Items.Add("Four")
ComboBox1.Items.Add("Five")
End Sub
This would add the five items to the drop-down box.
You could use a loop to populate the list:
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
For f As Integer = 1 To 1000
ComboBox1.Items.Add(f)
Next
End Sub
|