I have several push buttons in a form.
When a button has got focus, I want to change that button's color to red.
How I can do that?
Thanks in advance.
Printable View
I have several push buttons in a form.
When a button has got focus, I want to change that button's color to red.
How I can do that?
Thanks in advance.
At desgin time you have to change the Style-property of the button to
1-graphical.
Then add GotFocus and LostFocus to your code.
Private Sub Command2_GotFocus()
Command2.BackColor = &HFF&
End Sub
Private Sub Command2_LostFocus()
Command2.BackColor = &H8000000F
End Sub
The only way i know to do that is to make sure that STYLE is set to Graphic and then assign a blank .bmp with a colour of your choice to the DOWNPICTURE property for that button.
Hope this helps.
Christopher