Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

How does KeyAscii behave under MBCS?

Posted on 2003-11-11
14
Medium Priority
?
354 Views
Last Modified: 2008-03-06
I can't seem to find any online resources about this.  I'm doing Japanese localisation under VB6, and I want to know how the following code behaves when running under a Japanese locale:

Private Sub txtXxxx_KeyPress(Index As Integer, KeyAscii As Integer)
End Sub

Does the KeyAscii value come in as Unicode corresponding to the character pressed in the local language?  Or is it more complicated than that?

If it IS Unicode, what happens for values inthe range x8000-xFFFF?  Is there any problem with signed Integers?
0
Comment
Question by:mtorr
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
  • 3
  • +3
14 Comments
 
LVL 2

Expert Comment

by:diarmaid
ID: 9721627

You could create a small vb project and set a breakpoint inside the keypress event and examine the KeyAscii value...
0
 

Author Comment

by:mtorr
ID: 9721667
I could, if I had access to a Japanese keyboard and knew what the Unicode values were... however, I don't.  I was really looking for a more theoretical answer!
0
 
LVL 16

Expert Comment

by:Richie_Simonetti
ID: 9721939
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:mtorr
ID: 9722255
Thanks - that was quite instructive about Unicode in general, but it didn't mention KeyAscii...
0
 
LVL 16

Expert Comment

by:Richie_Simonetti
ID: 9722850
0
 

Author Comment

by:mtorr
ID: 9729426
I need to know about KeyAscii, which is an argument to the TextBox control's KeyPress event.  I already know about the usual VB string functions.  Neither of your suggested links covers this.
0
 
LVL 16

Expert Comment

by:Richie_Simonetti
ID: 9731401
OK. Good luck then.
0
 
LVL 2

Expert Comment

by:diarmaid
ID: 9731450
My only other (last ditch) suggestion would be to check the Unicode values at http://www.unicode.org/charts/
0
 
LVL 26

Expert Comment

by:EDDYKT
ID: 9731490
To bad we don't have Japanese or chinese in our machine.

However since the
KeyAscii As Integer

I believe everything should be return as one

I guess
0
 

Author Comment

by:mtorr
ID: 9731605
Thanks for the link to the Unicode charts, diarmaid.  It has at least confirmed that Japanese characters seem to be in the range 3000-3FFF, so signed integers should not be a problem.

I still need to know how KeyAscii behaves with a Japanese OS/keyboard.  Somebody out there must know this, I'm sure!
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 10537176
mtorr, an EE Moderator will handle this for you.
Moderator, my recommended disposition is:

    Refund points and save as a 0-pt PAQ.

Dan Rollins -- EE database cleanup volunteer
0
 
LVL 2

Expert Comment

by:diarmaid
ID: 10539350
agreed
0
 

Accepted Solution

by:
ee_ai_construct earned 0 total points
ID: 10577775
PAQed, with points refunded (250)

ee_ai_construct
Community Support Moderator
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question