SpeakComputers.com online store
Electronics Software Computers Handhelds Laptops and Tablets Mobile Phones Digital Cameras Camcorders Games Music Books Sport Mens and Womens Watches Power Tools Household appliances
Software Downloads 2012 Software Mac Software Security Student Editions Windows 7 Office 2010

VB.NET ComboBox Control.

The VB.NET ComboBox control is typically used for selecting text field options from a the list. If the dropdownstyle is set to dropdownlist the user can only select one of the dropdown items within the list. If the dropdownstyle is set to dropdown, the user can enter text into the text field. If the dropdownstyle is set to simple, the ComboBox control acts as a listbox control with a searchable textbox.

Namespace: System::Windows::Forms
System.Windows.Forms (in system.windows.forms.dll)

Creating an new VB.NET Windows forms ComboBox.
Dim combobox As New ComboBox

Assigning a new location for the VB.NET Windows Forms ComboBox.
combobox.Location = New Point(20, 20)

Assigning a text value to the VB.NET ComboBox control.
combobox.Text = "Select one"

Adding a VB.NET ComboBox control to the form.
Me.Controls.Add(combobox)

Creating a Selected Index Changed Event for the VB.NET ComboBox control.
AddHandler combobox.SelectedIndexChanged, AddressOf combobox_selectedindexchanged

Responding to the VB.NET ComboBox Selected Index Changed event.
Private Sub combobox_selectedindexchanged(ByVal sender As Object, ByVal e As EventArgs)
MessageBox.Show("Indexed Changed")
End Sub

Adding items to the VB.NET ComboBox control.
Dim s1 As String = "Dell"
Dim s2 As String = "HP"
Dim s3 As String = "SONY"
combobox.Items.AddRange(New String() {s1, s2, s3})

VB.NET ComboBox control Tutorial.
Home About Privacy Policy Resouces Products Map

Copy Right 2006 SpeakComputers.com - All Rights Reserved.
Learn Spanish
Learn Spanish for free with our online and free tutorials with audio. See our grammar sections, verb sections and drills, massive vocabulary sections with audio, our Spanish verb conjugator and more.
Free Text to Speech Software
Get software that makes your computer read text aloud.
Text to Speech software that supports natural sounding TTS voices.
Convert text to MP3 files
Listen to webpages aloud or convert them to sound files