先添加一个全局变量,在窗体的KeyDown事件中
If e.KeyCode = Keys.add Then
If Vars("key_press") = #1/1/1 0:00:00# Then
Vars("key_press") = Date.Now
Else
Dim st As Date = Vars("key_press")
Dim t As TimeSpan = Date.Now - st
If t.TotalMilliseconds < 200 Then
Dim btn As WinForm.Button = e.form.Controls("Btn_saveadd")
btn.PerformClick()
Else
Vars("key_press") = Date.Now
End If
End If
End If