Handles clause requires a WithEvents variable defined in the containing type or one of its base types

前端 未结 8 1997
旧巷少年郎
旧巷少年郎 2021-01-04 03:15

I get the error

Handles clause requires a WithEvents variable defined in the containing type or one of its base types.

in the following co

8条回答
  •  说谎
    说谎 (楼主)
    2021-01-04 03:42

    I had this happen when I created a command button. When I let VB.net create the event I was immediately greeted with that error. What I did to fix it was deleted the object in the designer (a command button in my case), the code tied to it, saving my .sln & recreating the object. Problem solved.

提交回复
热议问题