I made a code that will change the background button when the mouse cursor over it, the user press and release it , and it work great...
The code below is a part of the code I made, which will change the background of the button when click by user.
Method to use:
butclick(sender)
Sub butclick(ByVal butname) 'code reset of button background //start// Main.bestassi_bluebut_about.BackgroundImage = My.Resources.buttonbg Main.bestassi_bluebut_internet.BackgroundImage = My.Resources.buttonbg Main.bestassi_bluebut_minitool.BackgroundImage = My.Resources.buttonbg Main.bestassi_bluebut_sysadmin.BackgroundImage = My.Resources.buttonbg Main.bestassi_bluebut_visual.BackgroundImage = My.Resources.buttonbg 'code reset of button background //end// butsel = butname.tag butname.backgroundimage = My.Resources.buttonsel End Sub
But I had to reset all of the background of the button first, the picture below explain why I need to do like this:
BEFORE ALL BUTTON CLICKED BY USER:

IF NOT RESET AND ALL BUTTON CLICKED BY USER:

IF WITH RESET:

So is there any better code for this? Because my method seen a bit silly. Is there any code that can change the background of all the button in one time?