Use different locale for the Format function?
In a VB6 application I have to build a file which contains a decimal number which must always be written in US format:
1,499.99
But the Format
function takes the system settings into account and on a German system this result would be produced: (Using the format string #,##0.00
)
1.499,99
Can I force the Format
function to use diff开发者_JAVA百科erent settings?
Str()
will always use dot as decimal delimiter, however it won't use any digit separator. You would get " 1499.99" not "1,499.99". How's that for you?
As far as I know there is no way to force the VB6 Format()
function to ignore system settings.
try using SetThreadLocale before FormatMessage
http://msdn.microsoft.com/en-us/library/dd374051(VS.85).aspx
精彩评论