---
title: "ComboBox Control in VB.Net"  
description: "ComboBox is a combination of a TextBox and a ListBox.  How use the ComboBox ControlDrag and drop ComboBox from toolbox on window Form.Code:'Here Item"  
author: "Pushpendra Singh"  
published: 2010-12-13  
updated: 2020-03-04  
canonical: https://www.mindstick.com/articles/293/combobox-control-in-vb-dot-net  
category: "vb.net"  
tags: ["vb.net"]  
reading_time: 2 minutes  

---

# ComboBox Control in VB.Net

[ComboBox](https://www.mindstick.com/articles/57/display-record-according-to-combobox-selection-in-csharp-dot-net) is a combination of a [TextBox](https://www.mindstick.com/articles/320/textbox-control-in-vb-dot-net) and a ListBox.\

**How use the ComboBox [Control](https://yourviews.mindstick.com/view/83439/bipartisan-gun-control-bill-passed-in-us-after-decades)**

[Drag and drop](https://www.mindstick.com/forum/454/how-to-drag-and-drop-multiple-image-from-one-canvas-to-onther-canvas-in-html5) ComboBox from toolbox on [window Form](https://www.mindstick.com/forum/527/how-to-pass-datagridview-s-cells-value-to-another-window-form).

![ComboBox Control in VB.Net](https://www.mindstick.com/mindstickarticle/6954dd86-57df-41c0-9ced-43d40d4fb255/images/bb02207f-26b2-44dc-a2a3-f78c93b0b3d8.png)

## Code:

```
'Here Item is added in combobox on form loadPrivate Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load                 ComboBox1.Items.Add("C#")'Add the First item in ComboBox         ComboBox1.Items.Add("J#")         ComboBox1.Items.Add("VB")         ComboBox1.Items.Add("Java")     End Sub'Here show the selected item in Label2 on ComboBox SelectedIndexChanged event        Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs)  Handles ComboBox1.SelectedIndexChanged         ' Assign the selected item in label         Label2.Text = "You selected " + ComboBox1.SelectedItem      End Sub
```

In above code Item is added dynamically so all Item in ComboBox1 will show at run time.

**Run the project**

![ComboBox Control in VB.Net](https://www.mindstick.com/mindstickarticle/6954dd86-57df-41c0-9ced-43d40d4fb255/images/87ea4174-add3-4f05-b2f4-c8405ff6883c.png)

When you [select](https://www.mindstick.com/forum/34066/use-select-operator-in-linq) the given [option](https://www.mindstick.com/forum/158788/what-is-rust-s-option-type-and-how-is-it-used-for-handling-nullable-values) then SelectedIndexChanged [event](https://www.mindstick.com/articles/167719/marquee-hire-benefits-of-event-lighting-hire-london) will fire and selected item will show in the messagebox.

![ComboBox Control in VB.Net](https://www.mindstick.com/mindstickarticle/6954dd86-57df-41c0-9ced-43d40d4fb255/images/030de0eb-8f73-4e26-be5e-b64c2cecfb6f.png)

**How set the AutoCompleteSource Properties**

Choose **AutoCompleteSource** property of ComboBox is ListItem and also set **AutoCompleteMode** to suggest, append, or SuggestAppend.

![ComboBox Control in VB.Net](https://www.mindstick.com/mindstickarticle/6954dd86-57df-41c0-9ced-43d40d4fb255/images/7ca6e2c3-68d6-4afd-815b-fd1e1b086cc9.png)

When you type any text in the ComboBox then it searches the related item and if related item is available then it suggest the related item.

![ComboBox Control in VB.Net](https://www.mindstick.com/mindstickarticle/6954dd86-57df-41c0-9ced-43d40d4fb255/images/74f831b6-b185-4965-9289-c5b9f93976c2.png)

---

Original Source: https://www.mindstick.com/articles/293/combobox-control-in-vb-dot-net

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
