How to Format a MaskedTextBox in Currency Using VB.Net
Submitted by janobe on Sunday, September 23, 2018 - 20:19.
In this tutorial, I will teach you how to format a textbox in currency using maskedtextbox. With this method you can format or filter a textbox in a currency mode. This simple application is made of Microsoft Visual Studio 2015. Check out the following steps below.
For more question about this article. You can contact me @
Email – [email protected]
Mobile No. – 09305235027 – TNT
FB Account – https://www.facebook.com/onnaj.soicalap
Or feel free to comment below
Creating Application
Step 1
Open Microsoft Visual Studio 2015 and create a new windows form application. After that, do the Form just like this.
Step 2
Double click the form to fire the load event handler
and do the following code to assign the value in the textbox.
- MaskedTextBox1.Text = "000"
- MaskedTextBox2.Text = "0000"
- MaskedTextBox3.Text = "00000"
- MaskedTextBox4.Text = "000000"
- MaskedTextBox5.Text = "0000000"
- MaskedTextBox6.Text = "00000000"
- MaskedTextBox7.Text = "000000000"
Step 3
Go back to the design views and double click the button to fire theclick event handler
of it. Then, do the following code to filter the textbox in currency.
- MaskedTextBox1.Mask = "0.00"
- MaskedTextBox2.Mask = "00.00"
- MaskedTextBox3.Mask = "000.00"
- MaskedTextBox4.Mask = "0,000.00"
- MaskedTextBox5.Mask = "00,000.00"
- MaskedTextBox6.Mask = "000,000.00"
- MaskedTextBox7.Mask = "0,000,000.00"
Add new comment
- 2285 views