Articles in this section
Category / Section

How to change the Back color and Image property of the ButtonAdv when it is Disabled?

1 min read

In ButtonAdv, Background color and Image can be customized by using its properties named Backcolor and Image.

 

The Following sample demonstrates the Background and Image changes, when ButtonAdv is Disabled.

C#

//To disable ButtonAdv
this.buttonAdv1.Enabled = false;
 
//To change the Background color of ButtonAdv
this.buttonAdv1.BackColor = Color.Red;
 
//To change the image for ButtonAdv
 
this.buttonAdv1.Image = global::ButtonDisableColor.Properties.Resources._2;

 

VB

'To disable ButtonAdv
   
Me. buttonAdv1.Enabled = False
Me. buttonAdv1.Text = "Disabled"
   
'To change the Background color of ButtonAdv
Me. buttonAdv1.BackColor = Color.Red
   
'To change the image for ButtonAdv
Me.buttonAdv1.Image = My.Resources._2

                             

                                                  C:\Users\keerthana.jegannatha\Pictures\Camera Roll\Back Color.png

Figure 1. Background color and Image of the ButtonAdv is changed When it is Disabled with Image.

Sample Links:

 

C#: Background color and Image Changed C#

VB: Background color and Image Changed VB

 

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment
Access denied
Access denied