|
-
Aug 10th, 2006, 04:12 AM
#1
Thread Starter
Addicted Member
[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
-
Aug 10th, 2006, 04:34 AM
#2
Thread Starter
Addicted Member
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
-
Aug 10th, 2006, 04:50 AM
#3
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)
-
Aug 10th, 2006, 04:58 AM
#4
Thread Starter
Addicted Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|