?
Solved

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

Posted on 2004-10-18
1
Medium Priority
?
454 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 32

Accepted Solution

by:
Erick37 earned 1000 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses
Course of the Month12 days, 9 hours left to enroll

777 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