Updating WebBrowser without full refresh

J

jeffrey.bigham

Hello,

I'm developing an application in C# using the WebBrowser control and
need to toggle images off and on. After some digging, I found the
appropriate registry key that needs to be set and then discovered how
to inform other windows that a change has taken place via an Interop
call to SendMessageTimeout using the flag WM_SETTINGCHANGE.

After all of this, the WebBrowser control still requires a full refresh
to reflect the change that I made to the registry. This messes up
javascript that I have running on the displayed page and it doesn't
seem to happen in Internet Explorer. How can I get the WebBrowser
control to toggle images without requiring a full refresh?

Thanks!
Jeff
 
G

Greg Young [MVP]

As far as I know IE itself needs a full reload in order for this setting to
be applied so I would think you will not find a way in the web browser
control.

It might be worth writing a test page that is written out by javascript to
see if you re-write the page through javascript whether or not it applies
the behavior.

Cheers,

Greg
 
J

jeffrey.bigham

You are indeed correct - IE does need a full reload for the changes to
take effect. Firefox appears to behave similarly.

Do you have any ideas on how I could do this? I noticed that if I go
through all of the images and set their src attributes to "" they
disappear. That's not at all ideal, but I suppose it's workable.

-Jeff
 

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