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. Triggering TAB key programmatically?

Triggering TAB key programmatically?

Scheduled Pinned Locked Moved C#
csharpquestion
2 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.
  • S Offline
    S Offline
    Sandeep Kalra
    wrote on last edited by
    #1

    Hi All **********Programmin Challenge************** I am developing a desktop application in C#.Net which opens another form of an unmanaged application. The WinForm(of unmanaged application) has number of controls on it .Textbox has a focus when application starts.I just want to focus on the third control which is a button by programmatically pressing the tab key SendKeys.SendWait(Keys.Tab.ToString()); //for taking focus on second control SendKeys.SendWait(Keys.Tab.ToString()); //for taking focus on the desired button which has a tabindex=2(0,1,2)ie third control It is not taking the focus from the textbox to the button but instead typing in the textbox "Tab". Thanks in advance Sandeep Kalra I am the ONE

    T 1 Reply Last reply
    0
    • S Sandeep Kalra

      Hi All **********Programmin Challenge************** I am developing a desktop application in C#.Net which opens another form of an unmanaged application. The WinForm(of unmanaged application) has number of controls on it .Textbox has a focus when application starts.I just want to focus on the third control which is a button by programmatically pressing the tab key SendKeys.SendWait(Keys.Tab.ToString()); //for taking focus on second control SendKeys.SendWait(Keys.Tab.ToString()); //for taking focus on the desired button which has a tabindex=2(0,1,2)ie third control It is not taking the focus from the textbox to the button but instead typing in the textbox "Tab". Thanks in advance Sandeep Kalra I am the ONE

      T Offline
      T Offline
      TheCardinal
      wrote on last edited by
      #2

      Sendkeys.Send("{TAB}") and arrange your tab order in the IDE

      Life - Dreams = Job TheCardinal CTC-RDG

      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