The 'AddressOf' expression has no effect in this context because the method argument to 'AddressOf' requires a relaxed conversion ...

The 'AddressOf' expression has no effect in this context because the method argument to 'AddressOf' requires a relaxed conversion to the delegate type of the event. Assign the 'AddressOf' expression to a variable, and use the variable to add or remove the method as the handler.