Formatting Text Box Values


Note: In Visual Studio you should use mmMaskedTextBox if you need an input mask for data entry


At times you may want to format values displayed in text boxes. The mmTextBox class has a custom Format property that allows you to do this. The Format property allows you to apply any standard .NET format string to the value contained in the text box.

For example, if you want a text box to display the value as currency, you can set the Format property to "C" (you may also want to set the TextAlign property to "Right":



© (c) 2026 Oak Leaf Enterprises, Inc., 1996-2026 • Updated: 02/12/26
Comment or report problem with topic