How does WebBrowser avoid caution the server's interface?

zhaozj2021-02-16  118

How does WebBrowser avoid caution the server's interface?

http://blogs.coder.cn/skyover/archive/2004/05/09/251.aspx

Everyone has used the WebBrowser control. Ha ha. Can provide us with a lot of convenient operations. However, if the computer can't get online or online speed, an interface that can't be found, isn't it a big picture. Ha ha. At least it is thinking. How to do it? Of course, check the network connection. IF (! Start.checkconnect ()) {this.axwebbrowser1.navigate ("about: frame, html, body {margin: 0px; padding: 0px;}

This feature is required to be connected to the Internet.

Retry

"

,

Ref

Arg2,

Ref

Arg2,

Ref

Arg3,

Ref

Arg4);

Return

CheckConnect is a function that checks if it is connected to the internet connection. Its core function is to use System.Net.dns.Resolve static class to detect. Public static bool checkconnect () {bool b = true; try {iphostentry ips = system.net.dns.resolve ("www.5inet.net"); b = true;} catch (exception ex) {b = false; console .Writeline (EX.TOSTRING ());} return b;} If the detection fails, navigate to About: Behind your error message is added. How is it, very simple.

转载请注明原文地址:https://www.9cbs.com/read-13376.html

New Post(0)