System.Windows.Forms.TextBoxBase.ForeColor Property

Gets or sets the foreground color of the control.

Syntax

[System.Runtime.InteropServices.DispId(-513)]
public override System.Drawing.Color ForeColor { set; get; }

Value

Documentation for this section has not yet been entered.

Remarks

You can use the TextBoxBase.ForeColor property to change the color of the text within the control to match the text of other controls on your form. You can also use this property to highlight a specific text box that contains an invalid value.

To change the background color of the control, use the TextBoxBase.BackColor property. When setting the TextBoxBase.ForeColor property of your text control, ensure that the color you choose does not cause the text of the control to disappear. For example, if the TextBoxBase.ForeColor and TextBoxBase.BackColor properties are both set to Color.Black, the text within your textbox control will not be visible.

This property might be over ridden if the TextBoxBase.ReadOnly property of the System.Windows.Forms.TextBoxBase is set to true.

Requirements

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0