Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

How does KeyAscii behave under MBCS?

Posted on 2003-11-11
14
Medium Priority
?
357 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
  • 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
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 

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: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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

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…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
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…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses

886 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