Solved

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

Posted on 2004-10-18
1
450 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 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

Independent Software Vendors: 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 While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…

735 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