473,326 Members | 2,126 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,326 software developers and data experts.

change Text Box Color.

I had created a textbox usercontrol , My aim is "once the textbox got focus,
its backcolor become lightgray", lost focus will change back to
default.Please be kind to help.

Private Sub stdTextBox_Gotfocus(ByVal sender As Object, ByVal e As
System.EventArgs) Handles MyBase.GotFocus
If Me.pMask = Mask.None Then Me.pPrevious_value = Me.Text
' pPrevColor = Me.BackColor
Me.BackColor = System.Drawing.Color.Azure
End Sub
Private Sub stdTextBox_Lostfocus(ByVal sender As Object, ByVal e As
System.EventArgs) Handles MyBase.LostFocus
If Me.pMask = Mask.None Then Me.pPrevious_value = ""
'Me.BackColor = pPrevColor <-- fail
Me.BackColor = System.Drawing.Color.White <-- How can I make the
textbox change back to its default color ?
End Sub
Nov 21 '05 #1
0 1316

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

14
by: Reply Via Newsgroup | last post by:
Folks, Say I have a table, ten columns, ten rows - Each with a word in it. I want to change the values of some/all of the cells in the table via a hyperlink. How do I reference each cell and...
6
by: Louise | last post by:
Hi I have written an HTML pages which does not have any colour specifying tags as far I know. When I view this in an Microsoft internet explorer browser it appears with a white background and...
34
by: Andrew DeFaria | last post by:
I thought this would be fairly straight forward but apparently it's not. Given the following html file: <!DOCTYPE html PUBLIC "-//w3c//dtd html 4.0 transitional//en"> <html> <head>...
5
by: AFN | last post by:
I'm trying to set a submit button to change text and color when clicked. Like saying "please wait" instead of "submit" and then changing the background color and text color. All works, except for...
4
by: ACaunter | last post by:
Hi there, I was wondering if there was a way to change the font color of the text in the title bar... by default the title bar is that dark blue faiding into light blue and it has white text......
3
by: Tom | last post by:
I am writing a Visual basic .Net database application. There are many forms that first let you select and look at a DB record and then when you click a "modify" button you are allowed to change...
3
by: John Smith | last post by:
I'm looking into this peace of code: protected void DropDown_SelectedIndexChanged(object sender, EventArgs e) { DropDownList list = (DropDownList)sender; TableCell cell = list.Parent as...
2
by: John Smith | last post by:
Will this line of the code: item.Cells.Text = "Some text..."; change only DataGrid visual value or it will also change value in the DataSource? How can I change value in DataSource? ...
7
by: =?Utf-8?B?QnJpYW4gQ29vaw==?= | last post by:
I want to change the font color and weight at a specific position in the text. I am not sure where or what I need to do. It will be at position 155/156 from the left on each line. Here is the...
18
by: wizdom | last post by:
Help - change text on click - text has another onclick inside with php variables ---------- I think what I'm trying to do is simple. I have a 2 buttons on a page. 1 button allows a thread of...
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
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
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: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
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: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.