Hi,
I'm working on a simple calculator program for work in VB.NET and I'd like it that an operation could be performed without a mouse click and instead by using the Enter key.
So essentially I want the segment of the program that is usually run by button to have the ability to be run by the Enter key
I'm using VS2010.
This is what I was trying to do but I suppose I'm not doing it correctly because the Enter key does not do anything when I press it.
Sorry I am still new to this stuff. Thanks.
I'm working on a simple calculator program for work in VB.NET and I'd like it that an operation could be performed without a mouse click and instead by using the Enter key.
So essentially I want the segment of the program that is usually run by button to have the ability to be run by the Enter key
I'm using VS2010.
This is what I was trying to do but I suppose I'm not doing it correctly because the Enter key does not do anything when I press it.
VB.NET:
Private Sub btnCalc_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles btnCalc.KeyDown
Select Case e.KeyCode
Case Keys.Enter
End Select
End Sub
Sorry I am still new to this stuff. Thanks.