Solved

VB Engine localizes CStr(true) - want test mach. to do same

Posted on 2004-10-18
1
440 Views
Last Modified: 2012-05-05
I wrote an app that uses the actual text for "True" and "False".  For someone in Germany that is "Wahr" and "Falsch".  So this line:

   cstr(cbool(-1))

returns "True" for me, but "Wahr" for the German.

I want my test machine to return "Wahr" and "Falsch", so I can test my app.  I changed all the regional settings I could see to German, but it looks like I need to do something more so that the VB6 engine returns "Wahr" and "Falsch".  Anyone know what that is?
0
Comment
Question by:kevinbenedict
1 Comment
 
LVL 32

Accepted Solution

by:
Erick37 earned 250 total points
ID: 12341126
This used to be a "bug" in VB, but it seems to have been fixed in Visual Studio 6.0 Service Pack 3.
If you have SP3 or higher, then you should not see the coerced strings.  I believe that in order for your app to display German, you will have to explicitly use that language either in code or as an option as a language string resource.

See:
FIX: Visual Basic 6.0 Booleans are Coerced to Localized Strings
http://support.microsoft.com/default.aspx?scid=kb;EN-US;216379


And regarding the Resource Files:
Multiple String Table Model
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/resed98/html/vbconmultiplestringtablemodel.asp
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now