|
-
May 10th, 2017, 07:22 PM
#1
Thread Starter
Lively Member
Decimal Formatting Help
Hello fellow forumers! I have been having this issue, I have made this program that basically counts how many say tenths are in a given range like say 10 to 0. Well, in the Display when the data is being shown, I get an output of: 10, 9.9,9.8,9.7,9.6,9.5,9.4,9.3,9.2,9.1,9, etc...
Well, I am wanting to make this program look professional so say where the 10 is, I would like it to say 10.0 or if they are say doing thousandths, it be like 10.000, Know what I mean? I have been to stackexchange, MSDN, but none pose a good solution to this matter. Any help works! Thanks
Code Area:
Code:
'Where I want to format
While (startNum >= EndNum + 0.1)
counter += 1
startNum -= 0.1
Data += startNum & vbNewLine
valprint += startNum & Space(4)
pgbProgress.Increment(1)
End While
starting = txtStart.Text
rtbDisplay.Text = starting & vbNewLine & Data & vbNewLine
rtbVerticalText.Text = starting & Space(4) & valprint
lblCount.Text = counter
btnClear.Enabled = True
btnCount.Enabled = False
txtStart.Enabled = False
txtEnd.Enabled = False
End Sub
Last edited by Dragnorian; May 11th, 2017 at 12:07 AM.
Reason: Added Coding
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|