如何检查互联网连接? [英] How to check internet connection?

查看:100
本文介绍了如何检查互联网连接?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,

我想通过应用程序发送SMS,然后再检查计算机是否具有实时Internet连接.

问候.


LuxCoder

Hello,

I want to send SMS through my application, before which i want to check whether the computer has live internet connection. Is there a fool-proof way to determine it?

Regards.


LuxCoder

推荐答案

My.Computer .Network.IsAvailable 可以确定计算机当前是否已在网络中连接.

还可以ping一些网站以检查互联网连接

My.Computer.Network.IsAvailable  can determine whether computer is currently connected in network or not.

You can also ping some website to check internet connection

    If My.Computer.Network.Ping("www.google.com") = True Then
            MsgBox("Internet available")
        Else
            MsgBox("Internet unavailable")
        End If






这篇关于如何检查互联网连接?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆