Getting Started with WinForms Currency TextBox
18 Nov 20183 minutes to read
Assembly deployment
Refer to the control dependencies section to get the list of assemblies or NuGet packages that need to be added as a reference to use the control in any application.
You can find more details about installing the NuGet packages in a Windows Forms application at the following link:
Create a simple application with WinForms Currency TextBox
You can create a Windows Forms application with the WinForms Currency TextBox using the following steps:
Create a project
Create a new Windows Forms project in Visual Studio to display the WinForms Currency TextBox control.
Add control through designer
The WinForms Currency TextBox control can be added to an application by dragging it from the toolbox onto the designer surface. The Syncfusion.Shared.Base assembly reference will be added automatically:

Add control manually in code
To add the control manually, follow the steps below:
-
Add the Syncfusion.Shared.Base assembly reference to the project.
-
Add the Syncfusion.Windows.Forms.Tools namespace:
using Syncfusion.Windows.Forms.Tools;Imports Syncfusion.Windows.Forms.Tools -
Create a WinForms Currency TextBox instance and add it to the form:
CurrencyEdit currencyEdit1 = new CurrencyEdit(); this.Controls.Add(currencyEdit1);Dim currencyEdit1 As New CurrencyEdit() Me.Controls.Add(currencyEdit1)

Set the maximum and minimum values
You can set the maximum and minimum value of the currency through the MaxValue and MinValue properties of the WinForms Currency TextBox.
this.currencyTextBox1.MaxValue = 10;
this.currencyTextBox1.MinValue = 5;Me.currencyTextBox1.MaxValue = 10
Me.currencyTextBox1.MinValue = 5Set currency symbol
You can define the custom currency symbol using the CurrencySymbol property of the WinForms Currency TextBox.
//Setting custom currency symbol
this.currencyTextBox1.CurrencySymbol = "€";'Setting custom currency symbol
Me.currencyTextBox1.CurrencySymbol = "€"
Number format
You can customize the number format using the CurrencyDecimalDigits, CurrencyDecimalSeparator, CurrencyGroupSeparator, and CurrencyGroupSizes properties of the WinForms Currency TextBox.
Me.currencyTextBox1.DecimalValue = 2132423543
Me.currencyTextBox1.CurrencyDecimalDigits = 3
Me.currencyTextBox1.CurrencyDecimalSeparator = "."
Me.currencyTextBox1.CurrencyGroupSeparator = ","
Me.currencyTextBox1.CurrencyGroupSizes = New Integer() {3}