Click here to Skip to main content
15,867,885 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
My application uses an IWebBrowser2 control.
If you close a context menu (for example the pane title context menu) by clicking into the web control, it freezes on the current page.
You can no longer navigate to any other webpage without restarting the application.

What I have tried:

Calling members of m_browser, including Stop() and Quit() before navigating to the new page.
Calling ExecWB with various different command ids
Posted
Updated 24-Aug-17 0:59am
Comments
Richard MacCutchan 14-Aug-17 12:13pm    
And your question is what?
tro2t 14-Aug-17 12:41pm    
How can I prevent IWebBrowser2 from locking up? Or break it out from a locked state?
Richard MacCutchan 14-Aug-17 13:03pm    
You first need to find out what is happening and why it locks up. It is impossible for anyone here to guess what your program is doing.

What you're describing is not normal behavior for the control. You have to figure out why the thing is locking up in the first place before you can come up with a "prevent it from happening".

I'd start by looking into the page that's loaded by the control before it locks.
 
Share this answer
 
Comments
tro2t 15-Aug-17 2:19am    
The problem does not appear to be page specific. It happens for any webpage, local or remote.

I'm thinking something has gone wrong with ActiveX/COM. This is all in third party code so unfortunately I have no access to the source and cannot see how the control is getting locked.

I say locked, but what I mean is that it fails to navigate to other pages. You can still use the scrollbars to view up and down the webpage. Just that you are locked to that page.

Also any other instances of the web control will also be locked on their current page once you get into this state.
Dave Kreskowiak 15-Aug-17 9:52am    
The WebBrowser control just wraps a stripped down Internet Explorer, so you should also be having problems with IE. Any plug-ins in IE?

tro2t 16-Aug-17 3:55am    
IE is working fine. I have disabled all plugins and still have trouble in my application.
Dave Kreskowiak 16-Aug-17 10:04am    
Well, I don't have a clue then.

There is no such thing as a module for "ActiveX/COM" that can be broken or fixed. If COM didn't work, Windows wouldn't even run.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900