---
title: "ComboBox Control in C#.Net"  
description: "ComboBox control is a combination of a TextBox and a ListBox.  How to use ComboBoxDrag and drop ComboBox from toolbox on window Form.Code:using System"  
author: "Pushpendra Singh"  
published: 2011-01-24  
updated: 2020-03-04  
canonical: https://www.mindstick.com/articles/396/combobox-control-in-c-sharp-dot-net  
category: "c#"  
tags: ["c#"]  
reading_time: 2 minutes  

---

# ComboBox Control in C#.Net

[ComboBox](https://www.mindstick.com/articles/57/display-record-according-to-combobox-selection-in-csharp-dot-net) [control](https://yourviews.mindstick.com/view/83439/bipartisan-gun-control-bill-passed-in-us-after-decades) is a combination of a [TextBox](https://www.mindstick.com/articles/320/textbox-control-in-vb-dot-net) and a ListBox.\

## How to use ComboBox

[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 C#.Net](https://www.mindstick.com/mindstickarticle/1b643f10-0217-4740-a914-0d7caae1fe6d/images/cf3cdfd9-33dd-497d-aefd-45f5944efddb.png)

## Code:

```
using System;using System.Text;using System.Windows.Forms; namespace WindowsFormsApplication1{     public partial class Form6 : Form    {         public Form6()         {            InitializeComponent();         }         private void Form6_Load(object sender, EventArgs e)         {            // Item is added in combobox            comboBox1.Items.Add("C#");            comboBox1.Items.Add("J#");            comboBox1.Items.Add("VB");            comboBox1.Items.Add("Java");         } private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)         {            // Selected value will show in Label            label1.Text = "Selected Language is " +    comboBox1.SelectedItem.ToString();         }    }}
```

## Run the project

![ComboBox Control in C#.Net](https://www.mindstick.com/mindstickarticle/1b643f10-0217-4740-a914-0d7caae1fe6d/images/c2407f71-fd3d-4897-a217-72b28e3e6895.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 [Label](https://www.mindstick.com/articles/12835/print-label-tracking-how-do-these-features-make-auspost-woocommerce-plugin-better).

![ComboBox Control in C#.Net](https://www.mindstick.com/mindstickarticle/1b643f10-0217-4740-a914-0d7caae1fe6d/images/46a889a7-336d-48c0-bac0-2d8f9bfc1eda.png)

## AutoComplete ComboBox

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

![ComboBox Control in C#.Net](https://www.mindstick.com/mindstickarticle/1b643f10-0217-4740-a914-0d7caae1fe6d/images/e59399b7-04da-4e65-a4d1-85babd856b96.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 C#.Net](https://www.mindstick.com/mindstickarticle/1b643f10-0217-4740-a914-0d7caae1fe6d/images/ce5f70c4-27a5-4573-8f3e-4b82f84d4d8c.png)

## ComboBox Properties:

AutoCompleteMode: Defines an option that controls how automatic completion works for the ComboBox.

AutoCompleteSource: Defines a value specifying the source of complete strings used for automatic completion.

BackColor: BackColor of ComboBox is changed through BackColor property.

## Example:

```
private void Form6_Load(object sender, EventArgs e){      //change backcolor of comboBox      comboBox1.BackColor = Color.CadetBlue;}
```

## Output

![ComboBox Control in C#.Net](https://www.mindstick.com/mindstickarticle/1b643f10-0217-4740-a914-0d7caae1fe6d/images/cb463545-46af-4431-8a27-17f5df50a0b1.png)

---

Original Source: https://www.mindstick.com/articles/396/combobox-control-in-c-sharp-dot-net

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
