I'm struggling to understand these arguments.
They are automatically generated and I don't need to give them much thought but if I want to call one of these events from some other part of the form then I need to supply these arguments with values - not easy as I'm still unsure what they mean.
Here is the event I'd like to Call
:
Private Sub stringButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles stringButton.Click
Dim outString As String
Select Case stringTextBox.Text
Case ""
outString = "You entered an empty string"
Case "10"
outString = "10"
Case Else
outString = "Your string is not covered by the cases"
End Select
strResultTextBox.Text = outString
End Sub
Here is the calling method:
Private Sub stringTextBox_KeyDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles stringTextBox.KeyDown
If e.KeyCode = Keys.Enter Then
Call stringButton_Click(Me, Me) '<<(Me,Me) is my incorrect attempt
End If
End Sub
What arguments should I use and why?