Browser Control in MDI

  • Thread starter Thread starter dmsy
  • Start date Start date
D

dmsy

I am writting a MDI application (like VS.NET) that uses the IE Browser
Control. This is in .NET envoironment, but I have seen this problem on
others (VB).

I have a "file menu -> new" that creates a new MDI Child that contains
the IE Browser Control. It loads www.yahoo.com and I can scroll right
away. But when I create the second MDI Child and switch back to the
first, I am not able to scroll (mouse wheel) unless I first press TAB.

Another problem in MDI environment is when I highlight some text in the
MDI browser and I switch to another application, and come back to my
App, the highlight does not come back. I have to press tab again for
the highlight to show up and to be able to scroll. I am able to use
keys but just not the mouse wheel.

It seems like the browser control has not captured the mouse and
therefore not scrolling and not showing the hightlight. What could be
causing these problems? Am I supposed to implement some interface?
Anyhow, I found an app that uses IE that can do what I want. It is
called Abolimba, although I doubt it is MDI (tab based but not MDI).
 
I am writting a MDI application (like VS.NET) that uses the IE Browser
Control. This is in .NET envoironment, but I have seen this problem on
others (VB).

I have a "file menu -> new" that creates a new MDI Child that contains
the IE Browser Control. It loads www.yahoo.com and I can scroll right
away. But when I create the second MDI Child and switch back to the
first, I am not able to scroll (mouse wheel) unless I first press TAB.

Another problem in MDI environment is when I highlight some text in the
MDI browser and I switch to another application, and come back to my
App, the highlight does not come back. I have to press tab again for
the highlight to show up and to be able to scroll. I am able to use
keys but just not the mouse wheel.

It seems like the browser control has not captured the mouse and
therefore not scrolling and not showing the hightlight. What could be
causing these problems? Am I supposed to implement some interface?
Anyhow, I found an app that uses IE that can do what I want. It is
called Abolimba, although I doubt it is MDI (tab based but not MDI).

Hi,
You can try to capture Deactivate event of your MDI, hosting the IE
control, and store the item currently with focus. Then, on Activate
event, you can set the focus again to this control (in your case IE).
Maybe this will solve the problem, at least your control will have the
focus.

Sunny
 
I have tried that. It does nothing even if I focus the IE control. The
weird thing is that I can do shortcuts like ctrl-p (print), up and down
arrow keys to move the page, even page up and page down works as
expected. It is just the mouse wheel that is not working and the
highlight not showing up.
 
Back
Top