Re: Display Chinese strings from Access Database

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Anushi \(Grapecity\) (anonymous_at_discussions.com)
Date: 11/22/04


Date: Mon, 22 Nov 2004 16:09:52 +0530

Hi Derek,

Chinese characters are UNICODE. To be able to display the UNICODE string on
a Visual Basic form, the UNICODE controls must be used.

Add a built-in component named "Microsoft Forms 2.0 Object Library" from
Components Dialog Box. You can get Components dialog box by Pressing CTRL+T

They seem to be like default VB controls but are different in working. These
controls support UNICODE characters.
Here is the code for displaying UNICODE characters in a new TextBox control:

The code below will give you the unicode versions of the number range you
specify in the two text boxes.

' Code on CommandButton_Click Event
Private Sub Command1_Click()
  For i = Text1.Text To Text2.Text
    TextBox1.Text = TextBox1.Text & " " & ChrW(i)
  Next
End Sub

ChrW(number) is the actual function that performs the conversion.

Try using the range from 1500 to 1600 to see Urdu characters in your
TextBox.

Additional Reference :

[How To Read and Display UNICODE String on Visual Basic Form]

http://support.microsoft.com/default.aspx?scid=kb;en-us;193540

Hope this helps.

Anushi

"derekp" <derekp@discussions.microsoft.com> wrote in message
news:E2FE03EC-8FF2-442D-BB92-58A1B17AF215@microsoft.com...
> Hello,
>
> I'm looking for a simple proof of concept application that shows a VB6 app
> reading a Chinese string from an Access database and displaying it on a
form
> (in the caption, menu, button, etc.).
>
> Can anyone help out. I've tried this, but all I get are question marks
> ('?') for each Chinese character. I know I'm missing something obvious
here.
>
> Thanks in advance!
> Derek


Quantcast