I’m using WebBrowser and when I’m trying to call .Navigate(some_local_html) then nothing is displayed on my browser. If I then use MessageBox.Show(), then while message is shown I can see my html in browser. But when I close MessageBox, html is missing again.
I’ve tried Try-catch, but there was no errors.
I was trying to set default url on webBrowser control, and there is no result also. I can see nothing.
RESOLVED:
That wasn’t a thread itself, but some kind of thread. I added next code:
Stream stream = null;
webBrowser1.DocumentStream = stream;
and forgot to remove it… That’s a reason.
Thanks everyone!
Not sure if this will help at all, but it sounds like something is redrawing in the background, as when you put a messagebox up I am sure it sleeps the thread so nothing else can happen until it has been actioned, so whatever is overwriting it would be stopped temporarily.
If you do have something on that thread refreshing or redrawing frequently that could be causing your problems, try adding a button to your form which does a thread.sleep(1000) to see if that correctly displays your browser for a second.