I have a need to display (format) a number certain way.
[pre]
Type this: Display this:
0 0+00.00
1 0+01.00
1.5 0+01.50
20 0+20.00
35.75 0+35.75
123400 1234+00.00
55566.75 555+66.75
[/pre]
I can do it in Excel with Custom Format: #0+00.00 which allows me to enter the number into a cell, and then – when I leave this cell – format the display the way I need. The number itself – of course – does not change, just the display of it. I can come back to this cell to modify the number.
I want the same functionality in VB.NET 2013 Windows Form.
I did try the masked text box with different masks, I didn’t get any of them right.
I also need to display the numbers with this format in the DataGridView
Do I need to create one Function where I pass the number and return the formatted String? And another Function where I pass a String (555+66.75) and return the number 55566,75 (if I need to modify it)?
Any help is appreciated.
Have fun.
---- Andy
A bus station is where a bus stops. A train station is where a train stops. On my desk, I have a work station.
[pre]
Type this: Display this:
0 0+00.00
1 0+01.00
1.5 0+01.50
20 0+20.00
35.75 0+35.75
123400 1234+00.00
55566.75 555+66.75
[/pre]
I can do it in Excel with Custom Format: #0+00.00 which allows me to enter the number into a cell, and then – when I leave this cell – format the display the way I need. The number itself – of course – does not change, just the display of it. I can come back to this cell to modify the number.
I want the same functionality in VB.NET 2013 Windows Form.
I did try the masked text box with different masks, I didn’t get any of them right.
I also need to display the numbers with this format in the DataGridView
Do I need to create one Function where I pass the number and return the formatted String? And another Function where I pass a String (555+66.75) and return the number 55566,75 (if I need to modify it)?
Any help is appreciated.
Have fun.
---- Andy
A bus station is where a bus stops. A train station is where a train stops. On my desk, I have a work station.