Private Sub Text1_KeyPress(KeyAscii As Integer) If KeyAscii = 43 Then KeyAscii = 44 End If End Sub
应该可做系统钩子,Hook,拦取系统的键盘处理事件才行吧上面的做方只能在自己做的程序中用的!
不要把问题搞复杂了!现编的,满足你的要求:在窗体上放一个text1,粘贴以下代码,然后在text1上按+号键吧Option Explicit Private Sub Form_KeyPress(KeyAscii As Integer) If KeyAscii = 43 Then KeyAscii = 44 End If End SubPrivate Sub Form_Load() Me.KeyPreview = True End Sub
If KeyAscii = 43 Then
KeyAscii = 44
End If
End Sub
Private Sub Form_KeyPress(KeyAscii As Integer)
If KeyAscii = 43 Then
KeyAscii = 44
End If
End SubPrivate Sub Form_Load()
Me.KeyPreview = True
End Sub
如果用的地方比较多,就用hook钩键盘,不太多的话
就自己改keypress里面的keyascii值。
用hook要注意,有可能会让其他的程序中的按键值也改变
那用lxcc(虫子|专注于抢分) 的方法不就可以吗??
小弟还没听过。