Solved

How does KeyAscii behave under MBCS?

Posted on 2003-11-11
14
351 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
Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

 

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

Industry Leaders: 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!

Question has a verified solution.

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

Suggested Solutions

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

710 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