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. Textbox drop Focus on ENTER key

Textbox drop Focus on ENTER key

Scheduled Pinned Locked Moved Visual Basic
question
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.
  • R Offline
    R Offline
    roo426
    wrote on last edited by
    #1

    Every time I press the enter key after updating the value in a textbox I hear a beep and no events are raised. I would like it to raise the 'leave' event so I can change it's color and transfer focus to an other object. I managed to do it by checking for "vbcr" in the "form keypress event" but is there a better way? Why isn't enter key working on my textboxes? Hope that was clear as mud!!!! LOL Rob

    M 1 Reply Last reply
    0
    • R roo426

      Every time I press the enter key after updating the value in a textbox I hear a beep and no events are raised. I would like it to raise the 'leave' event so I can change it's color and transfer focus to an other object. I managed to do it by checking for "vbcr" in the "form keypress event" but is there a better way? Why isn't enter key working on my textboxes? Hope that was clear as mud!!!! LOL Rob

      M Offline
      M Offline
      minhnguyen08
      wrote on last edited by
      #2

      You can use Textbox_presskey event. Such as if keypress =13 then textbox.background=...... textbox2.focus end if

      R 1 Reply Last reply
      0
      • M minhnguyen08

        You can use Textbox_presskey event. Such as if keypress =13 then textbox.background=...... textbox2.focus end if

        R Offline
        R Offline
        roo426
        wrote on last edited by
        #3

        Thanks, nerver noticed that the textbox had a keypress event too!!!! I stay up to late to program I guess..... LOL But it still doesn't solve my problem of why it beeps when I press enter instead of just updating the control.

        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