Click here to Skip to main content
15,884,298 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi all,how can i change the text color of a button without creating a new calss for button.and how we can set the background of any statix text as transperent.please help me..
Posted
Updated 2-Jun-11 23:10pm
v2

Try this...
Button2.ForeColor = System.Drawing.Color.Red;
 
Share this answer
 
Comments
Jijesh Balakrishnan 3-Jun-11 5:19am    
what is this Button2? is it the id of button?
Jijesh Balakrishnan 3-Jun-11 5:22am    
and i think this is in case if c#?
Deepthi Aravind 3-Jun-11 5:33am    
yes...button2 is the id of button..
 
Share this answer
 
Comments
Resmi Anna 3-Jun-11 5:38am    
If you need to do this in VC++, you have to follow the above link. there is no easy way of doing it other than this as in c#
Chandrasekharan P 3-Jun-11 5:47am    
I guess the OP wants to do this in VC++
Use Button property, ForeColor:

Button1.ForeColor=Drawing.Color.Blue
 
Share this answer
 
Comments
Jijesh Balakrishnan 3-Jun-11 5:18am    
but it showing that, there is no ForeColor property

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