Value Settings in Windows Forms MaskedTextBox (MaskedEditBox)

The value settings of the MaskedEditBox control are discussed below.

MinValue and MaxValue

You can set the minimum and maximum values of the MaskedEditBox control by using MinValue and MaxValue properties.

MaskedEditBox Properties Description
MinValue Specifies the minimum value that can be set through the MaskedEditBox. The default value is set to '0'.
MaxValue Specifies the maximum value that can be set through the MaskedEditBox.The default value is set to '79228162514264337593543950335'.
this.maskedEditBox1.MinValue = new decimal(new int[] {50, 0, 0, 0});
this.maskedEditBox1.MaxValue = new decimal(new int[] {100, 0, 0, 0});
Me.maskedEditBox1.MinValue = New Decimal(New Integer() {50, 0, 0, 0})
Me.maskedEditBox1.MaxValue = New Decimal(New Integer() {100, 0, 0, 0})