Forum Discussion
AlexeyK
13 years agoSmartBear Alumni (Retired)
Suvidh,
I'm not a big specialist in Visual Basic controls, but, probably, picture boxes cannot be focused as they are non-windowed controls. Can you focus it when working with your application manually?
If I'm wrong and this control can be focused, SetFocus should work. Alternatively, you can try setting the focus by simulating the TAB keystroke:
* Move the cursor over the control (for example, a text box) that is before the picture box in the TAB order.
* Use the Keys(...) method to simulate the TAB keystroke in this control:
testboxObj.Keys("[Tab]")
The focus should jump to your control.
Related Content
Recent Discussions
Check PopupMenu exists
Solved3 days agomfoster711- 4 days agosimonaferrara
- 4 days agomacheshmeh