看板Programming
标 题Re: 输入字元 ,让特定的元件动作?
发信站KKCITY (Thu Jul 13 15:39:16 2006)
转信站ptt!ctu-reader!ctu-peer!news.nctu!netnews.csie.nctu!news.ee.ttu!news.n
※ 引述《leon329 (从缺)》之铭言:
>
> 对哦~~ 完全忽略keydown按按键就会动了....@@"
> 印象中,计概的英文大小写转成数字是不一样的
> 原来keycode 和 ASCII 完全不一样呀 ^^!!
>
> 大大说的没错~~~是可行的方式..
> 现在重点在於 ~~要怎麽用 for 来 call 各个 command1 ~ 19_click了 @@"
你该不会要做十九个command 吧...
那我建议你用成元件阵列
Private Sub Command1_Click(index As Integer)
Call aa(index)
End Sub
Private Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode >= 65 And KeyCode <= 75 Then
Call aa(KeyCode - 64)
End If
End Sub
Private Sub aa(index)
Print index
End Sub
乱写的...自己看看是不是你要的....
在你按出 a ~ i 会有动做...但...j以後就不会动了
--
┌─────◆KKCITY◆─────┐ KK免/费/拨/接 ◤
│ bbs.kkcity.com.tw │▏电话(1):449◤1999 电话(2):4058-6000
└──《From:220.229.203.163
》──┘▏帐号:kkcity 密码:kkcity
--