|
-
Aug 21st, 2000, 05:05 AM
#1
Thread Starter
Registered User
Hi...
I have a little problem:
I cant set focus on object which is NOT located on the form.
Let's say I run the program EXTERNAL.EXE, it has 3 objects on its form. When I set focus on the EXTERNAL form, I can set focus with TAB on these 3 objects.
Let's say I wanna set focus on object with TabIndex=1 located at the EXTERNAL.EXE form,
How do I do this with a VB program?
-
Aug 21st, 2000, 06:28 AM
#2
Frenzied Member
If you ca find out its hWnd then you can use the setFocus API
Code:
Private Declare Function SetFocus Lib "user32" Alias "SetFocus" (ByVal hwnd As Long) As Long
but I'm not sure how Tabindex's are handled (I don't thinks it's Window's reponsibility to do the tapping, I think it's the programs, which would make it very hard)
but you could try setting the focus to the parent window of all the controls, that will probably get you to the first item in the taborder.
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
|