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

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

问题描述

我无法在VB6的文本框文本更改按键事件中创建两个KeyAscii代码.当我在文本框中输入& s然后将其更改为W.我创建了一个KeyAscii代码,可以正确更改其他KeyAscii代码.但是两个KeyAscii代码无法更改.

一个KeyAscii代码是

I can''t make two KeyAscii code in text box text change keypress event in VB6. When I input the text box a & s then change it and make W. I create one KeyAscii code that change other KeyAscii code properly.But two KeyAscii code can''t change it.

One KeyAscii code is

If KeyAscii = 97 Then
KeyAscii = 132


它工作正常.但是它不能工作两个KeyAscii代码.如


It work properly. 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.

推荐答案

我听不懂这种语法.请在此处编写以下代码.
谢谢.
I can''t understood this syntax. Please write the following code here.
Thank you.


这太简单了:条件
This is way too simple: the condition
If KeyAscii = 97 and KeyAscii = 97 ...


如果100%等于


if 100% equivalent to

If KeyAscii = 97 ...



如果您在第二部分中使用其他立即数而不是等于97,则该条件将始终返回false,因为没有数字可以同时等于两个不同的值.

在问您的问题之前请三思而后行.

—SA



Should you use some other immediate constant for the second part, not equal to 97, the condition would always return false as no number can be equal to two different values at the same time.

Just think a bit before asking your questions.

—SA


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

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