Solved

textbox setfocus and back color change

Posted on 2008-10-09
3
632 Views
Last Modified: 2012-05-05
Can anyone tell me how to set the setfocus to texbox and change the backcolor with my C# window application?

0
Comment
Question by:tommychiu
  • 2
3 Comments
 
LVL 22

Expert Comment

by:p_davis
ID: 22681554
               TextBox t = new TextBox();
            t.Focus();
                t.BackColor = Color.Blue;
0
 

Author Comment

by:tommychiu
ID: 22681986
actually I have couple of textbox, If I select the first textbox then the back color change to blue otherwise change it back to normal.
0
 
LVL 22

Accepted Solution

by:
p_davis earned 500 total points
ID: 22682010
ok, if you select a text box then you have an enter event for each one or they can all share the same and in that you can set the backcolor as i have shown above.
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Article by: Ivo
C# And Nullable Types Since 2.0 C# has Nullable(T) Generic Structure. The idea behind is to allow value type objects to have null values just like reference types have. This concerns scenarios where not all data sources have values (like a databa…
In order to hide the "ugly" records selectors (triangles) in the rowheaders, here are some suggestions. Microsoft doesn't have a direct method/property to do it. You can only hide the rowheader column. First solution, the easy way The first sol…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

759 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now