The question is not clear enough you would need to start with explaining the purpose of what you are doing so, you can get more help if you further clarify the question. I doubt that handling KeyUp and checking up Enter makes any practical sense at all. If you need assign true to the property Form.KeyPreview and handle the event PreviewKeyDown or override the method OnPreviewKeyDown: There is another problem of handling keyboard events on the forms: you probably have some controls which grab keyboard focus, so the KeyDown event is not dispatched to the form itself. And using auto-generated names of methods permanently is against good programming style, as such names violate (good) Microsoft naming conventions. then on the same promise get the same result: that promise’s result. They are not passing the result to each other yet process it separately. Private Sub textBox1KeyUp(ByVal sender As Object, ByVal e As ) Handles textBox1.KeyUp Determine whether the key entered is the F1 key. In this example, there are just several handlers to a promise. It does not tell anything by itself adding a delegate to an invocation list is done using += event operator. This example assumes that a TextBox control, named textBox1, has been added to the form and its KeyUp event has been contected to this event handler method.
This is just suggested by the name of the method, as it looks like an auto-generated code you got from the designer. You did provide any evidence that MainForm_KeyUp is an event handler added to the invocation list of the KeyUp event instance of any of the forms.
It is not clear what is it and why "Frm2 comes to MainForm_KeyUp". If you call .ShowDialog, your form is shown in the modal state, so the user is supposed to work only with this form in this application (so, it is not system-modal, you can switch to other applications, activate their windows), cannot invoke events of other forms. First of all, none of the forms are children here, and your main form is not a parent of your other form.