How can I to set Button's Backcolor?

  • Thread starter Thread starter Risen
  • Start date Start date
R

Risen

Hi, all,

How can I to set Button's Backcolor?
How can I to set Panel's Backcolor?
Can I set Panel.text to my owner value??

Thx a lot.


B.R.
Risen
 
Use the BackColor property for both the Panel and the Button.

You will notice that the BackColor property is not available via the
designer under VS 2003 but is under VS 2005. So if you are using VS 2003,
you will have to set the BackColor property via code.

It is pointless setting the Panel.Text property, generally Panels are used
for containers such as creating a wizards etc.

Regards
Simon.
 
In addition your device will need to have the .NETCF v1.0 SP2 runtime or
later for the Button.BackColor property to have an effect.

Peter
 
Thx. But why my code is not work? The code is:
"
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Button1.BackColor = Color.Red
End Sub
"
My mean that Button_click procedure set Backcolor itself is not work! Why?
 
Back
Top