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. C#
  4. Focus previous TextBox

Focus previous TextBox

Scheduled Pinned Locked Moved C#
question
5 Posts 3 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.
  • T Offline
    T Offline
    Tavbi
    wrote on last edited by
    #1

    Hi, how can I simple focus previous textbox when up arrow key pressed. When down key pressed I use SendKeys.Send("{TAB}"). thanks, Jure

    N E 2 Replies Last reply
    0
    • T Tavbi

      Hi, how can I simple focus previous textbox when up arrow key pressed. When down key pressed I use SendKeys.Send("{TAB}"). thanks, Jure

      N Offline
      N Offline
      N a v a n e e t h
      wrote on last edited by
      #2

      Tavbi wrote:

      SendKeys.Send("{TAB}").

      Shift + Tab is the key to go back to the previous focus. I am not sure, but it will be something like

      SendKeys.Send("+{TAB}")

      All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia How to use google | Ask smart questions

      T 1 Reply Last reply
      0
      • N N a v a n e e t h

        Tavbi wrote:

        SendKeys.Send("{TAB}").

        Shift + Tab is the key to go back to the previous focus. I am not sure, but it will be something like

        SendKeys.Send("+{TAB}")

        All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia How to use google | Ask smart questions

        T Offline
        T Offline
        Tavbi
        wrote on last edited by
        #3

        Thanks man, it works!!! Jure

        N 1 Reply Last reply
        0
        • T Tavbi

          Thanks man, it works!!! Jure

          N Offline
          N Offline
          N a v a n e e t h
          wrote on last edited by
          #4

          You are welcome :)

          All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia How to use google | Ask smart questions

          1 Reply Last reply
          0
          • T Tavbi

            Hi, how can I simple focus previous textbox when up arrow key pressed. When down key pressed I use SendKeys.Send("{TAB}"). thanks, Jure

            E Offline
            E Offline
            Eslam Afifi
            wrote on last edited by
            #5

            Here are some methods that you can use SelectNextControl GetNextControl I don't know if they will scroll the form to the control or not. Use the ScrollControlIntoView method to scroll to the desired control.

            Eslam Afifi

            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