CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2008
    Posts
    52

    [RESOLVED] setting up color in current focussing textbox ???

    hi gurus ,

    how to set up color in the current (cursor locating) text box ?????

    i found out tht ... we should should code in

    Code:
        Private Sub TextFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles TxtZone.Enter, TxtPincode.Enter, TxtName.Enter, TxtCustomerID.Enter, TxtCity.Enter, TxtArea.Enter, TxtAddress2.Enter, TxtAddress.Enter
    
    
        End Sub

    however i donno wat to code... i tried a lot ... couldnt solve it ...


    Ps can ny 1 help me ...
    Microsoft .Net v4.0 [2010]

  2. #2
    Join Date
    Mar 2008
    Posts
    52

    Thumbs up Re: setting up color in current focussing textbox ???

    Code:
      Private Sub TextFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles TxtZone.Enter, TxtPincode.Enter, TxtName.Enter, TxtCustomerID.Enter, TxtCity.Enter, TxtArea.Enter, TxtAddress2.Enter, TxtAddress.Enter, TxtSTNo.Enter, TxtPhone.Enter, TxtMobile.Enter, TxtFax.Enter, TxtEmail.Enter, TxtCSTNo.Enter, txtcountry.Enter, TxtContactName.Enter
            DirectCast(sender, TextBox).BackColor = Color.Aqua
        End Sub
    
        Private Sub TxtName_Leave(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TxtName.Leave, TxtZone.Leave, TxtSTNo.Leave, TxtPincode.Leave, TxtPhone.Leave, TxtMobile.Leave, TxtFax.Leave, TxtEmail.Leave, TxtCustomerID.Leave, TxtCSTNo.Leave, txtcountry.Leave, TxtContactName.Leave, TxtCity.Leave, TxtArea.Leave, TxtAddress2.Leave, TxtAddress.Leave
            DirectCast(sender, TextBox).BackColor = Color.White
        End Sub

    from one of ma collegue .. Prem... []
    Microsoft .Net v4.0 [2010]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured