0

I realise that this is a question asked a lot, but the best answer seems to be to use the "AcceptButton" option ... I don't have that option, why would that be ?!?

I am using VS2010 & C# for my program, but nowhere is there an "AcceptButton" option !!!

4
Contributors
4
Replies
7
Views
6 Years
Discussion Span
Last Post by vodkasoda
0

This part belongs to VB.Net so i use .Net code ok.

On the keypress event

If e.KeyChar=Chr(13) Then
Me.BtnOk_Click(Me.BtnOk,e)
End If

Private Sub BtnOk_Click(ByVal ....................) Handles BtnOk.Click
'BtnOk Code
End Sub
0

see the below screenshot which solve your problem

Aha ... it's on the FORM itself, I had checked the TAB, the BUTTON, the TEXTBOX, everywhere but the FORM !!!

Thanks ... much appreciated.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.