How to remove an event handler in VB.NET
You can do so using the RemoveHandler
operator, as such:
Private Sub Panel1_click(ByVal sender As Object, ByVal e As System.EventArgs)
Dim panel As Panel = CType(sender, Panel)
RemoveHandler panel.Click, AddressOf Panel1_Click
End Sub
The same way you added it:
RemoveHandler s.Click, AddressOf Panel1_Click
Reference