C# WebBrowser Control System.AccessViolationException

后端 未结 8 2142
谎友^
谎友^ 2020-12-05 13:41

I have a program that uses the built in webbrowser control. At some point during the usage of this, I\'m not sure at what point, but it appears to be random, I get the foll

8条回答
  •  佛祖请我去吃肉
    2020-12-05 14:03

    My gut feeling is that you are trying to manipulate the document before you've navigated to one. Try navigating to "about:blank" before changing the document text or html.

    If you already are performing navigation, note that navigation is asynchronous, so you need to monitor the events of the browser in order to detect when the navigation is complete. Otherwise, you may try to write to the document before it exists.

提交回复
热议问题