Reputation: 17
I was working on a project and for no reason all Handles disappeared from the form
For example:
Private Sub Button17_Click(sender As Object, e As EventArgs) Handles Button17.Click
has become
Private Sub Button17_Click(sender As Object, e As EventArgs)
I have a lot of tools in the form Is there a shortcut to retrieve Handles?
Upvotes: 0
Views: 626
Reputation: 54457
There's nothing to retrieve. They are just regular methods now. You need to attach them to the appropriate events like you would any other method you wrote yourself. Open the Properties window in the designer and click the Events button. Select a control on the form, click the drop-down for the event of interest and select the correct method.
Upvotes: 2
Reputation: 7527
This happens if a control is being cut and pasted back on the form or if it's deleted and recreated with the same name.
To recreate the Handles
you can click behind the closing bracket and press SPACE - TAB - SPACE and fill the rest up with the help of IntelliSense.
Upvotes: 2