WebBrowser in MDI form messes with other controls focus

T

TkPins

Hi All,

If I place a com "wrapped" WebBrowser control on a form - it works fine if
NOT and MDI child.
If it is an MDI child, then the other controls (text boxes for example) -
will not take mouse input correctly, etc.

I researched and found a fix to call form.Activate() if WM_MOUSEACTIVATE is
called - but it did not work.
I also found a fix to additionally subclass the WebBrowser to call Focus() -
which did not work.

If you switch to a different MDI child, and then switch back - everything
then works correctly.

If you switch to a different application, and then switch back - everything
then works correctly.


This is very frustrating - I have not found any useful info so far.
- Again - the Activate() on WM_MOUSEACTIVATE does not work

Thanks in advance for any help.

Tom
 
T

TkPins

- UPDATE -

I implemented a workaround that I really don't like, but it works.

In the forms Load event, I Show() another form (very small) and then Close()
it immediately (almost not noticeable flash).

By switch forms, and then back the problem goes away.

-- Please - if anyone has a better solution, please let me know.

Thanks,
Tom
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top