Click here to Skip to main content
15,884,472 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
how to change textbox bordor color when i enter my mouse inside the textbox, language is c#
please help me as soon as possible ,
Posted
Updated 18-Jan-12 7:58am
v4
Comments
fjdiewornncalwe 18-Jan-12 13:52pm    
You need to tag your question with the language you are using. Is this vb, c#, c++? Is is WinForms, Silverlight, asp.net?
peutz kumar gupta 18-Jan-12 14:11pm    
i have mention my language its c#
fjdiewornncalwe 18-Jan-12 17:23pm    
One more question. Is this project a web application (asp.net), or WinForms, Silverlight, etc.?

1 solution

You need to use MouseEnter and MouseLeave events of the textbox to make changes in your textbox. As far as I remember when mouse enters to your textbox you want to change the border color in MouseEnter event and set it back to its previous state in MouseLeave event.

But textbox class does not have a border color property so you have to create your own custom control and tweak your textbox from there, not from textbox class.

Some example links:
How to change Textbox BorderColor in C#?[^]
How to change TextBox border color in C# ?[^]

Good luck,
OI
 
Share this answer
 
v2

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