944,181 Members | Top Members by Rank

Ad:
  • VB.NET Discussion Thread
  • Unsolved
  • Views: 21385
  • VB.NET RSS
Jul 2nd, 2006
0

How Vb.NET Textbox background color change when TabStop come?

Expand Post »
I have 3 textbox. I want to change Background color when cursor go there, other wise there will be no change.
How can i do this?

My mail address pretom82@hotmail.com
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
pretom is offline Offline
1 posts
since Jun 2006
Jul 4th, 2006
0

Re: How Vb.NET Textbox background color change when TabStop come?

Try this:
VB.NET Syntax (Toggle Plain Text)
  1. Private Sub ChangeBackcolorRed(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.MouseEnter, TextBox2.MouseEnter, TextBox3.MouseEnter
  2. sender.backcolor = Color.Blue
  3. End Sub
  4.  
  5. Private Sub ChangeBackcolorWhite(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.MouseLeave, TextBox2.MouseLeave, TextBox3.MouseLeave
  6. sender.backcolor = Color.White
  7. End Sub
Reputation Points: 84
Solved Threads: 58
Posting Pro in Training
waynespangler is offline Offline
461 posts
since Dec 2002
Jun 16th, 2011
0

back ground color for textbox

VB.NET Syntax (Toggle Plain Text)
Private Sub ChangeBackcolorRed(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.Enter, TextBox2.Enter, TextBox3.Enter
sender.backcolor = Color.Blue
End Sub

Private Sub ChangeBackcolorWhite(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.Leave, TextBox2.Leave, TextBox3.Leave
sender.backcolor = Color.White
End Sub
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Gopinathv is offline Offline
1 posts
since Jun 2011
Jun 16th, 2011
0
Re: How Vb.NET Textbox background color change when TabStop come?
Hi,

@waynespangler, your code is working with mouseEnter and MouseLeave, but the OP wants to change the backcolor when Tabstop set the focus on the textbox.

@Gopinathv Welkom to the Forum
Last edited by Luc001; Jun 16th, 2011 at 9:59 am.
Reputation Points: 85
Solved Threads: 98
Posting Whiz
Luc001 is offline Offline
376 posts
since Mar 2010

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in VB.NET Forum Timeline: null reference error
Next Thread in VB.NET Forum Timeline: Storing a String to an Array String





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC