如果源码比较复杂或用到其他控件,可以将源码打包发送至我的邮箱:[email protected] 谢谢! 如果测试可用,再加100分!!!
都不是我要的。!求高手继续帮忙
用按键精灵~~~
哈哈,肯定不行。
-----------------------------------
我再来回答下吧。我的想法就是 递归。也就是说,当产生按键这一事件时,让程序重复模拟5次此按钮,即重复执行这一事件5次。这是我在VB.NET中的代码:
Private i As Integer = 0
Private j As String
Private k As Object
Private t As KeyPressEventArgs
Private Sub Form1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles Me.KeyPress
j = j & e.KeyChar.ToString
k = sender
t = e
i = i + 1
If i <= 5 Then
Form1_KeyPress(k, t)
Exit Sub
Else
MsgBox("你按下了:" & e.KeyChar & "键,当前系统自动重复5次按键后为:" & j)
i = 0
j = ""
Exit Sub
End If
End Sub
--------------------------------------------------
经测试是可行的,不过如果你具体用到你的程序中要做一定的修改。
最后的测试结果是:按一下a键: