Hi, I am a very beginner to VB, my new job involves quite some VB programming. I have a compile error here that I don't know how to handle, appreciate it if anyone could help.
...
Private Sub OK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OK.Click
...
...
End Sub
...
Private Sub z_KeyPress(ByVal KeyAscii As Integer)
'where KeyAscii=13 denotes the Enter key.
If (KeyAscii = 13) Then
OK_Click()
End If
End Sub
All I want to do is that when you press ENTER key, it does what you do by clicking the OK button. But what are the 'sender' and 'e' parameters I needt to call?
Thanks!
...
Private Sub OK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OK.Click
...
...
End Sub
...
Private Sub z_KeyPress(ByVal KeyAscii As Integer)
'where KeyAscii=13 denotes the Enter key.
If (KeyAscii = 13) Then
OK_Click()
End If
End Sub
All I want to do is that when you press ENTER key, it does what you do by clicking the OK button. But what are the 'sender' and 'e' parameters I needt to call?
Thanks!