# TXBarcodeControl.ForeColor Property

> Gets or sets the foreground color for the barcode. The default color is System.Drawing.SystemColors.WindowText.

- **Product:** TX Text Control .NET for Windows Forms
- **Section:** Reference
- **Kind:** Property
- **Introduced:** 29.0
- **Namespace:** `TXTextControl.Barcode`
- **Package:** `TXTextControl.TextControl.WinForms.SDK` (assembly `TXBarcode.Windows.Forms.dll`, from the private NuGet feed or Text Control Offline Packages)
- **.NET Framework:** reference `TXBarcode.Windows.Forms.dll` from the setup
- **Path:** TX Text Control .NET for Windows Forms > Reference > TXTextControl.Barcode > TXBarcodeControl.ForeColor Property
- **285 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-barcode/txbarcodecontrol/forecolor-property/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-barcode/txbarcodecontrol/forecolor-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-barcode/txbarcodecontrol/forecolor-property/llms-full.txt

---

### Description

Gets or sets the foreground color for the barcode. The default color is `System.Drawing.SystemColors.WindowText`.

### Syntax

```csharp
public Color ForeColor { get; set; }
```

```vbnet
Public Property ForeColor As Color
```

### Examples

The following example uses `TXBarcodeControl.ForeColor` to set the txbarcode control's foreground color. The change is then applied to the active document or user interface.

```csharp
tXBarcodeControl.ForeColor = System.Drawing.Color.LightSteelBlue;
tXBarcodeControl.Update();
```

```vbnet
tXBarcodeControl.ForeColor = System.Drawing.Color.LightSteelBlue
tXBarcodeControl.Update()
```

---

## Nearby

- **Previous:** [TXBarcodeControl Constructor](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-barcode/txbarcodecontrol/constructor/llms-full.txt)
- **Next:** [TXBarcodeControl.GetDefaultText Method](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-barcode/txbarcodecontrol/getdefaulttext-method/llms-full.txt)
