如何工作两个KeyAscii代码 [英] How to work two KeyAscii code

查看:52
本文介绍了如何工作两个KeyAscii代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hallo亲爱的,
我尝试用母语进行个人布局.我无法在文本框文本更改按键事件中创建两个KeyAscii代码.就像我输入一个文本框a&s一样,当我输入一个文本框a&s然后更改它并使其变为W.我创建了一个KeyAscii代码,该代码正确地更改了其他KeyAscii代码. 如果KeyAscii = 97然后
KeyAscii = 132.但是它不能同时使用两个KeyAscii代码.例如
如果KeyAscii = 97而KeyAscii = 97,那么
KeyAscii = 101"

请尽快帮助我.

Hallo Dear,
I try to make a personal layout in my mother language. I can''t make two KeyAscii code in text box text change keypress event. Like i input a text box a & s, when i input this text box a & s then change it and make W. I create one KeyAscii code that change other KeyAscii code properly. "If KeyAscii = 97 Then
KeyAscii = 132". But it can''t work two KeyAscii code. Such as
"If KeyAscii = 97 and KeyAscii = 97 then
KeyAscii=101"

Please as soon as possible help me.

推荐答案

以下是跟踪文本框的文本更改事件的示例代码,如下所示:

Here is the sample code to track the text change event of text box as:

this.textBox1.KeyPress += new System.Windows.Forms.KeyPressEventHandler(CheckKeys);


private void CheckKeys(object sender, System.Windows.Forms.KeyPressEventArgs e)
{
 if (e.KeyChar == (char)13)
 {
   // Then Enter key was pressed
 }
}



代替Enter键,您可以根据需要跟踪任何按键.



In stead of Enter key, you can track any key stroke as per your need.


我无法解决我的问题.
我想知道它在VB6中是如何工作的.
请再次阅读我的问题并尽快答复我?
I can''t solved my problem.
I want to know how it works in VB6.
Please read my question once again & answer me as soon as possible?


这篇关于如何工作两个KeyAscii代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆