Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. Changing Textbox Background color upon gaining focus

Changing Textbox Background color upon gaining focus

Scheduled Pinned Locked Moved Visual Basic
questionhelptutorial
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    Like2Byte
    wrote on last edited by
    #1

    Hi, Thanks for looking. I'm trying to determine how to change the background color of a textbox when the focus is given to a textbox. Changing the color is easy. How do I determine who has the focus so I can change the color? Can someone help me? Thanks.

    D L 2 Replies Last reply
    0
    • L Like2Byte

      Hi, Thanks for looking. I'm trying to determine how to change the background color of a textbox when the focus is given to a textbox. Changing the color is easy. How do I determine who has the focus so I can change the color? Can someone help me? Thanks.

      D Offline
      D Offline
      Daniel Turini
      wrote on last edited by
      #2

      On the "Enter" event, you can set the background color of the event source. My latest articles: XOR tricks for RAID data protection Win32 process suspend/resume tool

      1 Reply Last reply
      0
      • L Like2Byte

        Hi, Thanks for looking. I'm trying to determine how to change the background color of a textbox when the focus is given to a textbox. Changing the color is easy. How do I determine who has the focus so I can change the color? Can someone help me? Thanks.

        L Offline
        L Offline
        Like2Byte
        wrote on last edited by
        #3

        Opps, sorry. Stealing bandwidth here. Here's what I found... Double click in the control. Delete the function the IDE creates. Select the "GotFocus" command in the right hand drophand list box in the IDE. A new function will appear. Type in: ctrlName.BackColor = {{valid color code}} Thanks anyway.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups