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. problem when opening a form

problem when opening a form

Scheduled Pinned Locked Moved C#
helpquestion
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.
  • M Offline
    M Offline
    melanieab
    wrote on last edited by
    #1

    Hi, I can't begin to understand this one. I have a form with a tabcontrol. When I first enter one of the pages (whether by tabbing or opening the form), I say to focus on a button. It does focus on that button but you wouldn't know it by looking at it (the dotted rectangle isn't there). I noticed that when the Tab key was pressed, the newly focused button will highlight, so when opening the form, I focused on the button next to the one I want focused and did a SendKeys.Send("{Tab}");. This works if the current tab page is the one in focus (I have another "screen" on that same tabpage where I can press an Exit button to return to the original screen), but it refuses to work when that tabpage is first opened - when tabbing into the page from another or opening the form. I'm completely out of ideas around this problem. Anyone know what I could do? :confused: Thanks so much for any help!!! Mel

    S 1 Reply Last reply
    0
    • M melanieab

      Hi, I can't begin to understand this one. I have a form with a tabcontrol. When I first enter one of the pages (whether by tabbing or opening the form), I say to focus on a button. It does focus on that button but you wouldn't know it by looking at it (the dotted rectangle isn't there). I noticed that when the Tab key was pressed, the newly focused button will highlight, so when opening the form, I focused on the button next to the one I want focused and did a SendKeys.Send("{Tab}");. This works if the current tab page is the one in focus (I have another "screen" on that same tabpage where I can press an Exit button to return to the original screen), but it refuses to work when that tabpage is first opened - when tabbing into the page from another or opening the form. I'm completely out of ideas around this problem. Anyone know what I could do? :confused: Thanks so much for any help!!! Mel

      S Offline
      S Offline
      S Senthil Kumar
      wrote on last edited by
      #2

      Your solution looks like a hack. Did you try setting the TabIndex property in the Designer to set the right Tab order? Regards Senthil _____________________________ My Blog | My Articles | WinMacro

      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