Microsoft KB Archive/189056

= BUG: Incorrect Localized Strings Display in the Visual Basic IDE =

PSS ID Number: 189056

Article Last Modified on 10/15/2002

-

The information in this article applies to:


 * Microsoft Visual Basic Professional Edition for Windows 5.0
 * Microsoft Visual Basic Enterprise Edition for Windows 5.0

-



This article was previously published under Q189056



SYMPTOMS
When you use string tables with the Visual Basic Resource Editor, the string returned by the LoadResString function is not localized when you run your application in the Visual Basic Integrated Development Environment (IDE).



CAUSE
The Visual Basic Resource Editor is an add-in, and the resources are not included until the .exe file is created.



RESOLUTION
Compile the application into an .exe file and run the .exe.



STATUS
Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. We are researching this bug and will post new information here in the Microsoft Knowledge Base as it becomes available.



Steps to Reproduce Behavior
NOTE: These steps assume that you have already downloaded and installed the Visual Basic Resource Editor. The Visual Basic Resource Editor add-in is available for download at the following Web site:

http://msdn.microsoft.com/vbasic/downloads/download.asp?ID=027.

 In Visual Basic, create a new Standard EXE project. On the Tools menu, click Resource Editor. In the Visual Basic Resource Editor, click Edit String Tables on the toolbar. In the Edit String Tables window, click Insert New String Table on the toolbar. By default, the first string table added is English (United States). Click Insert New String Table again. In the next combo box that is inserted, click French (Standard). In the Id 101 row, type &quot;Hello World (English)&quot; in the English (United States) column and &quot;Hello World (French)&quot; in the French (Standard) column.</li> Close the Resource Editor windows. On the Project menu, click Add New Resource File. Follow the prompts to save and open the resource file.</li>  Add a command button to a form. In the Click event, add the following code: MsgBox(LoadResString(101)) </li> Run the application in the Visual Basic IDE, and click Command1. Note that the message box displays &quot;Hello World (English).&quot;</li> In the Control Panel, change the language in Regional Settings to French (Standard). If you are using Windows 95 or Windows 98, you will need to restart your computer before the changes take effect. Run the program in the IDE again, and click Command1.

RESULT: The message box displays &quot;Hello World (English)&quot; instead of &quot;Hello World (French)&quot; as expected.</li> Create the .exe file, and run it. Click Command1.

RESULT: The message box displays &quot;Hello World (French).&quot;</li></ol>

Keywords: kbBug kbDSSTools KB189056

Technology: kbAudDeveloper kbVB500 kbVB500Search kbVBSearch kbZNotKeyword2 kbZNotKeyword6

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© 2003 Microsoft Corporation. All rights reserved.