Click here to Skip to main content
15,900,378 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
In one of my forms I have over 10 buttons. I would like to give each button a tag such as "CursorChange". I am trying to change the cursor to cursors.hand on button1.MouseEnter.

What I have tried:

I know that I can create separate handles for each mouse enter event but I would rather not create a handle for every button that I would like to do this with, as I would implement this with other forms too.
Posted
Updated 17-Jun-21 9:42am

1 solution

One event and n buttons:
Private Sub Button1_n_Click(sender As Object, e As EventArgs) Handles Button1.Click, Button2.Click, Button3.Click

your code should be here

End Sub
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900