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. focusing in Windows App

focusing in Windows App

Scheduled Pinned Locked Moved C#
help
4 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.
  • P Offline
    P Offline
    Pr teek B h
    wrote on last edited by
    #1

    When I open my application, it automatically focuses on a button. I want it to focus on the text, so that the user doesn't have to click on the text box. I have already tried textbox1.focus(), but it still focuses on the button. Any help would be appreciated. Thanks, Prateek

    G 1 Reply Last reply
    0
    • P Pr teek B h

      When I open my application, it automatically focuses on a button. I want it to focus on the text, so that the user doesn't have to click on the text box. I have already tried textbox1.focus(), but it still focuses on the button. Any help would be appreciated. Thanks, Prateek

      G Offline
      G Offline
      Giorgi Dalakishvili
      wrote on last edited by
      #2

      Try textbox1.Select()

      Giorgi Dalakishvili #region signature My Articles Asynchronous Registry Notification Using Strongly-typed WMI Classes in .NET [^] My blog #endregion

      P 1 Reply Last reply
      0
      • G Giorgi Dalakishvili

        Try textbox1.Select()

        Giorgi Dalakishvili #region signature My Articles Asynchronous Registry Notification Using Strongly-typed WMI Classes in .NET [^] My blog #endregion

        P Offline
        P Offline
        Pr teek B h
        wrote on last edited by
        #3

        Thanks, that helped :)

        G 1 Reply Last reply
        0
        • P Pr teek B h

          Thanks, that helped :)

          G Offline
          G Offline
          Giorgi Dalakishvili
          wrote on last edited by
          #4

          Glad to help you :)

          Giorgi Dalakishvili #region signature My Articles Asynchronous Registry Notification Using Strongly-typed WMI Classes in .NET [^] My blog #endregion

          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