I have 15 buttons created through design.
I want them to have a background picture whenever I click on any of them, for example:
- If I click on button11 then its background will be "Hello.jpg"
- If click button12 then its background will be become "Hello.jpg"
Is there a method to write a code instead of writing code for individual button?
The code should detect which button I clicked and then change its background.
Private Sub e_11_Click(sender As Object, e As EventArgs) Handles e_11.Click
e_11.Image = Image.FromFile("E:\battleship\Explode.gif")
End Sub
Is there a way that handles every button click?