Fog Creek Software
Discussion Board




Unicode and VB6

Thank you for the enlightening article on Unicode and Character Sets.

Inspired by the article, I tried to copy and paste samples from many languages in my VB6 application text boxes; the western European samples work. For all other languages, such as Hebrew and Russian all I get it a pile of vertical bars. I wonder if a user using a localized Windows version would get the same result.

I look for some hints on this on the web and I found this link:

http://support.microsoft.com/default.aspx?scid=http://support.microsoft.com:80/support/kb/articles/q193/5/40.asp&NoWebContent=1

Ube Jega
Saturday, October 11, 2003

What font are you using? Try "Arial Unicode MS".

Brad Wilson (dotnetguy.techieswithcats.com)
Saturday, October 11, 2003

The native Visual Basic Controls are not Unicode enabled.  You need to use Unicode enabled controls. 

Microsoft provides the Microsoft Forms Controls for this purpose.  The "fm20.dll" is the DLL that contains these controls.  Simply add a reference to it from the VB IDE.

These controls are used by MS-Office/VBA and apparently are not distributable with your application.

Microsoft says this:

"The Fm20.dll is NOT redistributable. You must have an application such as Microsoft Office 97 on the target system that installs Fm20.dll as part of its setup. (Fm20.dll is included with the OSR2 and OSR2.5 releases of Windows 95.) You can also find this file on the Visual Basic 5.0 CD under the \TOOLS\DataTool\Datatool\Msdesign folder. This will be installed only if you run the setup for the Visual Database Tools. In any case, you may not distribute the Fm20.dll as part of your setup, even if you purchase the Microsoft Office Developer Edition product."

Download this to get "fm20.dll":

http://msdn.microsoft.com/workshop/misc/cpad

You may also simply type, "unicode textbox control" in the MSDN search box.  It brings up a lot of useful information.

Dave B.
Saturday, October 11, 2003

I see you found it.  Didn't follow your link. Sorry.

Dave B.
Saturday, October 11, 2003

Thank you. Our application will still target our intended audience, but for sake of completness it would be nice to support all countries/languages. I'll try the Arial unicode font. Regarding the dll, it is interesting, but the re-distribution is an issue; we can't expect our customers to have Office97 in each box.

UB
Saturday, October 11, 2003

As far as I know Arial Unicode is also a part of MS Office and not redistributable. Probably the best way to get Unicode support on VB6 forms is to wrap the appropriate native operating system controls yourself in ActiveX controls. Otherwise this remains a very good reason to upgrade from VB6 to VB.Net.

Joel Spolsky
Saturday, October 11, 2003

If you are dealing with Unicode in VB6, don't forget the excellent "Internationalization With Visual Basic" by Michael S. Kaplan

http://www.amazon.co.uk/exec/obidos/ASIN/0672319772/normancx-21

Andy Norman
Sunday, October 12, 2003

*  Recent Topics

*  Fog Creek Home