954,593 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Displaying fixed digits = 7 -> 007

I want to format the number to display fixed digits, but the format code that I have seen doesn't have that option. I want to display the longitude of the cursor in DDD::MM::SS form. I want to see 7 degrees as 007::00::00.

My code in VC++.NET (formatting is not included):
statusBarPanelLon->Text = String::Concat (degrees.ToString(), S"::" , minutes.ToString(), S"::", rndSecs.ToString());

My code will display 7 degrees as 7::0::0. I was hoping there is something available in .net to use so I won't have to manually concat zeros.

Thanks.

DotNetUser
Junior Poster in Training
69 posts since Jun 2005
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You