I inherited this vb.net code and am a newbie vb.net programmer with old programming skills.
This problem exists in many places after calling a dialog box. After processing the dialog, if the enter key is pressed on the dialog instead of clicking OK, the enter key logic is then processed on the main form. This is undesirable and i need to just display the form.
It looks like "e.handled = True" may be the way to clear the key results, but it produces the "handled is not a member of Eventargs" error.
Can you please recommend the best way to handle this situation?
Thank You,
Brian
Private Sub mnuAbout_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mnuAbout.Click
Try
'Get the menu off of the screen cleanly
Application.DoEvents()
dlgAbout.ShowDialog()
**e.handled = True**
Catch ex As Exception
Call modErrorHandler.ErrorProcedure(ex.GetType.Name, Me.Name, ex.Message, ExceptionClassName(ex), ExceptionMethodName(ex), ExceptionLineNumber(ex))
End Try
End Sub