Results 1 to 4 of 4

Thread: [RESOLVED] Moving focus without knowing control's name (like a nextfocus method)

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Mar 2006
    Posts
    159

    Resolved [RESOLVED] Moving focus without knowing control's name (like a nextfocus method)

    I've read a bunch of posts relating to TAB, tabstop, and tabindex. They all are trying to do something different to what I need.

    What I would like to do is move the focus to the next tabindex on my form regardless where the current focus is (emulate the pressing of TAB).

    Can anyone help with moving the focus around without knowing the name of the control? I guess the best way to describe what I want to do is have a nextfocus method.

    Cheers,
    Nap

  2. #2

    Thread Starter
    Addicted Member
    Join Date
    Mar 2006
    Posts
    159

    Re: Moving focus without knowing control's name (like a nextfocus method)

    Done.
    In another loosely related thread, I saw a few people suggest using SendKeys ("{TAB}"), but for different reasons.
    I decided to try it (since I didn't think you could use SendKey back to your own form) and it solved my question.

    Cheers,
    Nap

  3. #3
    Oi, fat-rag! bushmobile's Avatar
    Join Date
    Mar 2004
    Location
    on the poop deck
    Posts
    5,592

    Re: [RESOLVED] Moving focus without knowing control's name (like a nextfocus method)

    SendKeys will just send it to the active window - so bear in mind that won't work if your window doesn't have focus (which might not be an issue)

  4. #4

    Thread Starter
    Addicted Member
    Join Date
    Mar 2006
    Posts
    159

    Re: [RESOLVED] Moving focus without knowing control's name (like a nextfocus method)

    rgr & thnx for the comment.
    In this app, that's fine.

    Cheers,
    Nap

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width