Formatting decimal numbers for printing

swu

Active member
Joined
Mar 26, 2005
Messages
33
Programming Experience
1-3
I'm using the following code to output to a textbox, which I then print from.

Output.OutTB.AppendText(ControlChars.NewLine & "A: " & Aout & " ft")
Output.OutTB.AppendText(ControlChars.NewLine & "B: " & Bout & " inches")
Output.OutTB.AppendText(ControlChars.NewLine & "C: " & Cout & " mm")


I'd like to line decimal points of the values that are put in the output. Write now I get a staggered appearance.

My thought was to check the number of places before and after the decimal point and then use if then statements to cover the possibilities. This seems pretty time consuming.

Is there a better way?

Thanks in advance.

swu
 
Back
Top