473,320 Members | 1,713 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

C# changing the color of a text box when user enters

Hey,

Im having trouble making a textbox change colour when a user enters it. I have managed to textBox2.BackColor = Color.Pink; place that in the code which seems to work but I wish for it to only happen when a user enters it.

This is what I have:

private void textBox1_Enter(object sender, System.EventArgs e)
{

textBox2.BackColor = Color.Pink;

}

I cannot get it to work.

Thank you :-)
Feb 9 '07 #1
2 2276
nmsreddi
366 256MB
Hello

If you want to write it in any language just go for textbox text changed event it works well else if you want to use any script ,its better ,javascript can work well in your case
Feb 10 '07 #2
Is this for a windows form or ASP.NET?
Feb 10 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: Boyd Reilly | last post by:
I have a form that has the user pick the type of question he will answer. The input field will be a text, numeric or date type. So, after the question is answered, I need to change the input...
2
by: mjpiedade | last post by:
I just started with C#. How do I navigate on a dataset by changing the value of a textbox or other simple bound controls? Imagine that I have the customer name on a textbox and have a datagrid...
1
by: Shawn Benson | last post by:
I have a Windows form where a user enters an order number which returns a dataset that is bound to a datagrid. The problem is when a user clicks on a cell in the datagrid, then enters another...
7
by: Ed West | last post by:
Hello, I have a simple form with some input boxes. After validation if one fails, then I would like to at the top of the page say something like "The following fields in red are required" and...
1
by: amber | last post by:
Hello I'm trying to run the code below, but I'm running into a problem It is populating a listbox, based on whether or not the user enters data into a text box. If they enter something, it returns...
8
by: Rob | last post by:
It used to be "After Update" in Access, but in vb.net... After a user enters something into a textbox and presses the Enter button, I want the focus to move to another texbox. Which one do you...
3
by: thomson | last post by:
Hi All, i do have an website with the URL http://localhost/application/ASEAN-ANZ, Once i hit the application, it goes to the Global.asax. but after that if i tried to change the URL...
3
by: Mike | last post by:
Is there a way to determine if a user deleted text in a asp:textbox? I have a textbox were users can enter in a product number, then they click a button to see if the product numbers(s) exists in...
4
by: gubbachchi | last post by:
Hi all, Please anybody help me solve this problem. I am stuck up with this from past 2 weeks. I am developing an application where, when the user selects date from javascript datepicker and enters...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.