|
-
Aug 17th, 2000, 05:35 PM
#1
Hi people.
I was wondering, is there a way to display UNICODE characters using VB?
-
Aug 17th, 2000, 07:21 PM
#2
Fanatic Member
Like DBCS Characters you mean?
Paul Dwyer 
Network Engineer
Aussie In Tokyo
Using Powerbasic 6 & VB6 SP4 (Please also add your VB Version to your signature!)
-
Aug 17th, 2000, 07:28 PM
#3
I'm not sure what DBCS is...
-
Aug 18th, 2000, 04:40 AM
#4
Fanatic Member
DBCS is Double Byte Character Set, Which include the sub sets for Japnese, Chinese, Korean etc. They are 16 bit like unicode but the coding is different, because of this a system that natively supports unicode runs DBCS 'better'.
I just thought you might have been asking for this reason...
Paul Dwyer 
Network Engineer
Aussie In Tokyo
Using Powerbasic 6 & VB6 SP4 (Please also add your VB Version to your signature!)
-
Aug 18th, 2000, 05:01 AM
#5
Guru
Hebrew
Some languages, like Japanese, Chinese, Korean, Hebrew, etc. have an entire set of letters, and then accent marks. Since there's the English letter set, and then the other language letter set (which replaces the English accent marks, ASCII characters 224-250), the system has no room for the other language accent marks. 
So Microsoft decided to stick them in the 2nd byte for the characters in the DBCS system. 
Sc0rp: The answer is, if your operating system is a language enabled/localized version of Windows, any control will automatically support Unicode for that language.
(If we're talking about the same thing here... )
Also try messing with the StrConv function:
Code:
' Mess with this:
Text1.Text = StrConv(Text1.Text, vbUnicode)
' Or with this:
Text1.Text = StrConv(Text1.Text, vbFromUnicode)
-
Aug 18th, 2000, 07:59 AM
#6
Member
Wrong....
The above post is incorrect. I can guarantee that the regular text box control doesn't support unicode. You must instead use a Forms 2.0 text box. The following are instruction that I wrote to someone else for exactly this problem(note: if u don't have win nt, u must find a different path to the language packs on your Windows CD):
The default TextBox control(and all the other default controls) in Visual Basic are unable to interpret the double-byte characters of Unicode. Therefore you must switch your textbox (or other control) to the Microsoft Forms 2.0 equivalent. Below are the steps you need to take in order for Visual Basic to properly display Unicode characters.
1. Install the language pack you need.
a. Navigate to the "Langpack" directory on your NT 4.0 CD.
b. Right click on the appropiate *.inf file of the language that you need and select the install option
2. Install the Forms 2.0 ActiveX controls
a. Open your VB project
b. Goto the "Project" menu and select "components"
c. In the "Controls" tab of the components dialog box, check the "Microsoft Forms 2.0 Object Library"
3. In your toolbox where all your regular controls are displayed you will now see a set of controls from the Forms 2.0 component you just added.
a. Place a Forms 2.0 textbox control in your project (Not a regular textbox!)
b. Set the "Font" property of the textbox to match the language you are going to display. This font was installed along with the Unicode table when you installed the *.inf file. (E.G., MingLiu is the name of the font for Tchinese.inf)
c. Pass the unicode string into the textbox at run-time and you're all set!
Jason Romajas
-
Aug 18th, 2000, 08:00 AM
#7
Paul282, Yonatan: Yeap, that's what I'm talking about.
Yonatan: I want to DISPLAY characters in Unicode.
-
Aug 18th, 2000, 08:21 AM
#8
-
Aug 18th, 2000, 10:56 AM
#9
Fanatic Member
kl899,
You're a legend! Under win2k I've gotten kanji into the text boxes but only via using the API to fiddle with the clipboard output, I'm dealing with DBCS all the time and thought I knew all the tricks of the trade but I hadn't heard of the forms 2.0...
I'll definately look into this.
Paul Dwyer 
Network Engineer
Aussie In Tokyo
Using Powerbasic 6 & VB6 SP4 (Please also add your VB Version to your signature!)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|