If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register or Login
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Re: Thai Language on lvButtons in VB6

Well, I think this topic is not quite as trivial.
I'm struggling around with unicode text display as well at the moment.

You must know that usual VB controls except ListView and MSHFlexGrid are actually not unicode-aware. I'm not sure if you can put foreign writing into a usual button's caption, even if the reginal settings are given. (Have not tried that)

The controls of the Forms2.0 library, however, accept unicode characters of any language, as long as the font is installed on the computer. I was able to display Urdu, Farsi, Tamil and also Thai in any Form2.0 control, as well as in the ListView and the MSHFlexGrid, although, ListView gave up when trying to put unicode characters into the column headers. It just converted them to ANSI, as it seems, showing ??????? instead.

Re: Thai Language on lvButtons in VB6

Yes, David, I know about this sample and I know about this displaying of Japanese and Chinese characters which make people think "oh look, the VB6 TextBox can display unicode".
That's not the real thing after all. It cannot.

Try to show Tamil, Bengal or even russian cyrillics. It wouldn't work. Not with Thai at all.
The only controls which can really display Unicode strings are the MSHFlexGrid, ListView and the Forms2.0 controls, up to a certain extend.
I made a lot of tries recently and find a couple of strange problems when displaying foreign fonts' character sets.

!!First of all, Windows is aware of UTF16 encoding in the mentioned controls, which allows you to display most of the foreign languages like Punjabi, Tamil, Korean, Thai and even Inuktitut, as long as you have a fitting font installed on your computer.

Forms2.0, MSHFlexGrid and ListView seem to support (to a certain limited extend) the so called Font FallBack. That means, you set the Font of a TextBox or FlexGrid to "Arial" and read (or copy) some Arabic characters to the control. Font FallBack will now find that Arial has not the desired characters defined and will find the next font which supports the desired UTF16 wide characters. (Sometimes it doesn't and I'm still wondering why it does not work all the times).

Also when reading data from files you'd have to watch certain rules of getting unicode characters read in. You'd have to read byte arrays with Get or with InputB to achieve proper unicode input.