Web Control gaining focus after receiving remote message

I have an application written in C# that is comprised of a form that contains the web browser
control.  

I have a command line utility that takes a URL as a parameter and can send the URL to the 
browser application to cause the browser to go to the page specified in the URL.

This works well and was fairly simple to construct.  Now for the hard part.

The application is controlled by a remote control and keyboard for navigating around the
page.  This also works well with one exception.  When the browser application receives a URL 
and navigates to the page I want to be able to get input focus to the browser so I can 
navigate around the page with the remote control or the keyboard.  I am unable to get this 
to work unless I "click on the web browser" app with a mouse to select it.

I have tried setting focus using all the usual suspects:
- Form.focus()
- Form.activate()
- browser.focus()
- etc...

I've tried specifically selecting the control.  I've tried emulating mouse control commands
using SendCommand and still no luck.

Anyone know how to solve this problem

Thanks in advance


Answer this question

Web Control gaining focus after receiving remote message

  • Web Control gaining focus after receiving remote message