|
1. The latest research:
The TextBox that comes with VB can fully display Unicode. The Label control is also available. But it cannot display Unicode with two different code pages at the same time, for example: Arabic and Chinese. Except for English, which means that it can display Unicode with a mixture of Chinese and English. It can also display Arabic and English mixed Unicode. What you need to do is not only convert the Unicode string to MBCS, but also set the Font.CharSet and font of the TextBox. For example: Unicode String with mixed Chinese and English:
Text1.Font.Name = "Tohoma"
Text1.Font.charset = 134'--->GB2312 CharSet is 134
Text1.Text=MBCS_Encode(strUnicode,936) '936 is the code page of GB2312
MBCS_Encode uses WideCharToMultiByte(936, lFlags, StrPtr(strUnicode), _
TLen, b(0), lngBufferSize, vbNullString, 0)
2. In order to completely solve the Unicode display and editing problems, you can use CreateWindowsW to draw your own TextBox, which is to extend the TextBox function. |
|