[Solved] How i can format a number from a TextBox

Answered Closed
0
0

Hi, I Have a textbox with a numeric value, it is possible to format the number and display it with two decimals like 19.88

That I can do it from datagridview using the style, I want to do the same in the textbox control

Thanks

  • You must to post comments
Best Answer
0
0

you can use MASKEDTEXTBOX , this is a control in the toolbox

you can make its format

 

Or.. you can use the INPUTTYPE property in your textbox and choose number

 

or .. you can type this code

textbox1.text =  math.round(cdbl(val(textbox1.text),2)

 

thats all …

thanks

 

  • You must to post comments
0
0

Thank you,

I Use NumericUpDown control, and now I can format with two digits the number fields.

 

  • You must to post comments
Showing 2 results