導航:首頁 > 網路連接 > vb檢測網路連接

vb檢測網路連接

發布時間:2022-05-07 11:57:56

A. vb怎麼查看電腦是否連接到網路

GetHostbyNameAPI可獲取域名對應的IP地址,當沒有聯網狀態將會返回一個錯誤值。所以可利用它來判斷是否聯網。

PrivateSubForm_Load()
IfIsConnectedStateThen
MsgBox"連接網路"
Else
MsgBox"沒有聯網"
EndIf
EndSub

VBScriptcode復制代碼

OptionExplicit

PrivateTypeWSADATA
wversionAsInteger
wHighVersionAsInteger
szDescription(0To256)AsByte
szSystemStatus(0To128)AsByte
iMaxSocketsAsInteger
iMaxUdpDgAsInteger
lpszVendorInfoAsLong
EndType

"WSOCK32.DLL"(,lpWSADataAsWSADATA)AsLong
"WSOCK32.DLL"()AsLong
"WSOCK32.DLL"(ByValszHostnameAsString)AsLong
PrivateConstWS_VERSION_REQD=&H101

()AsBoolean
DimudtWSADAsWSADATA
CallWSAStartup(WS_VERSION_REQD,udtWSAD)
IsConnectedState=CBool(gethostbyname("www..com"))
CallWSACleanup
EndFunction

B. vb 如何檢測網路連接

這個我以前做過,用的是pingsql資料庫伺服器的ip,當ping實現的,把程序給你參考下,要是有什麼更好的辦法,不要忘了分享下,這種東西很有用
把下面的放模塊
Option Explicit
Public Const IP_STATUS_BASE = 11000
Public Const IP_SUCCESS = 0
Public Const IP_BUF_TOO_SMALL = (11000 + 1)
Public Const IP_DEST_NET_UNREACHABLE = (11000 + 2)
Public Const IP_DEST_HOST_UNREACHABLE = (11000 + 3)
Public Const IP_DEST_PROT_UNREACHABLE = (11000 + 4)
Public Const IP_DEST_PORT_UNREACHABLE = (11000 + 5)
Public Const IP_NO_RESOURCES = (11000 + 6)
Public Const IP_BAD_OPTION = (11000 + 7)
Public Const IP_HW_ERROR = (11000 + 8)
Public Const IP_PACKET_TOO_BIG = (11000 + 9)
Public Const IP_REQ_TIMED_OUT = (11000 + 10)
Public Const IP_BAD_REQ = (11000 + 11)
Public Const IP_BAD_ROUTE = (11000 + 12)
Public Const IP_TTL_EXPIRED_TRANSIT = (11000 + 13)
Public Const IP_TTL_EXPIRED_REASSEM = (11000 + 14)
Public Const IP_PARAM_PROBLEM = (11000 + 15)
Public Const IP_SOURCE_QUENCH = (11000 + 16)
Public Const IP_OPTION_TOO_BIG = (11000 + 17)
Public Const IP_BAD_DESTINATION = (11000 + 18)
Public Const IP_ADDR_DELETED = (11000 + 19)
Public Const IP_SPEC_MTU_CHANGE = (11000 + 20)
Public Const IP_MTU_CHANGE = (11000 + 21)
Public Const IP_UNLOAD = (11000 + 22)
Public Const IP_ADDR_ADDED = (11000 + 23)
Public Const IP_GENERAL_FAILURE = (11000 + 50)
Public Const MAX_IP_STATUS = 11000 + 50
Public Const IP_PENDING = (11000 + 255)
Public Const PING_TIMEOUT = 200
Public Const WS_VERSION_REQD = &H101
Public Const WS_VERSION_MAJOR = WS_VERSION_REQD \ &H100 And &HFF&
Public Const WS_VERSION_MINOR = WS_VERSION_REQD And &HFF&
Public Const MIN_SOCKETS_REQD = 1
Public Const SOCKET_ERROR = -1

Public Const MAX_WSADescription = 256
Public Const MAX_WSASYSStatus = 128

Public Type ICMP_OPTIONS
Ttl As Byte
Tos As Byte
Flags As Byte
OptionsSize As Byte
OptionsData As Long
End Type

Dim ICMPOPT As ICMP_OPTIONS

Public Type ICMP_ECHO_REPLY
Address As Long
status As Long
RoundTripTime As Long
DataSize As Integer
Reserved As Integer
DataPointer As Long
Options As ICMP_OPTIONS
data As String * 250
End Type

Public Type HOSTENT
hName As Long
hAliases As Long
hAddrType As Integer
hLen As Integer
hAddrList As Long
End Type

Public Type WSADATA
wVersion As Integer
wHighVersion As Integer
szDescription(0 To MAX_WSADescription) As Byte
szSystemStatus(0 To MAX_WSASYSStatus) As Byte
wMaxSockets As Integer
wMaxUDPDG As Integer
dwVendorInfo As Long
End Type

Public Declare Function IcmpCreateFile Lib "icmp.dll" () As Long

Public Declare Function IcmpCloseHandle Lib "icmp.dll" _
(ByVal IcmpHandle As Long) As Long

Public Declare Function IcmpSendEcho Lib "icmp.dll" _
(ByVal IcmpHandle As Long, _
ByVal DestinationAddress As Long, _
ByVal RequestData As String, _
ByVal RequestSize As Integer, _
ByVal RequestOptions As Long, _
ReplyBuffer As ICMP_ECHO_REPLY, _
ByVal ReplySize As Long, _
ByVal Timeout As Long) As Long

Public Declare Function WSAGetLastError Lib "WSOCK32.DLL" () As Long

Public Declare Function WSAStartup Lib "WSOCK32.DLL" _
(ByVal wVersionRequired As Long, _
lpWSADATA As WSADATA) As Long

Public Declare Function WSACleanup Lib "WSOCK32.DLL" () As Long

Public Declare Function gethostname Lib "WSOCK32.DLL" _
(ByVal szHost As String, _
ByVal dwHostLen As Long) As Long

Public Declare Function gethostbyname Lib "WSOCK32.DLL" _
(ByVal szHost As String) As Long

Public Declare Sub RtlMoveMemory Lib "kernel32" _
(hpvDest As Any, _
ByVal hpvSource As Long, _
ByVal cbCopy As Long)
Private Declare Function GetPrivateProfileString Lib "kernel32" Alias "GetPrivateProfileStringA" (ByVal lpApplicationName As String, ByVal lpKeyName As Any, ByVal lpDefault As String, ByVal lpReturnedString As String, ByVal nSize As Long, ByVal lpFileName As String) As Long
Private Declare Function WritePrivateProfileString Lib "kernel32" Alias "WritePrivateProfileStringA" (ByVal lpApplicationName As String, ByVal lpKeyName As Any, ByVal lpString As Any, ByVal lpFileName As String) As Long
Public strtempht1, strtempht2, strtempht3, strtempht4, strtempht5, strtempht6 As String, f%, Cfg$, my$, up$

Private Declare Function GetSystemMenu Lib "user32" (ByVal hwnd As Long, ByVal bRevert As Long) As Long

Private Declare Function RemoveMenu Lib "user32" (ByVal hMenu As Long, ByVal nPosition As Long, ByVal wFlags As Long) As Long

Public Function GetStatusCode(status As Long) As String

Dim msg As String

'Message Boxes
Select Case status
Case IP_SUCCESS: msg = "IP Successful"
Case IP_BUF_TOO_SMALL: msg = "IP Buffer Too Small"
Case IP_DEST_NET_UNREACHABLE: msg = "IP Destination Net Unreachable"
Case IP_DEST_HOST_UNREACHABLE: msg = "IP Destination Host Unreachable"
Case IP_DEST_PROT_UNREACHABLE: msg = "IP Destination Protocol Unreachable"
Case IP_DEST_PORT_UNREACHABLE: msg = "IP Destination Port Unreachable"
Case IP_NO_RESOURCES: msg = "IP No Resources"
Case IP_BAD_OPTION: msg = "IP Bad Option"
Case IP_HW_ERROR: msg = "IP Hw Error"
Case IP_PACKET_TOO_BIG: msg = "IP Packet Too Big"
Case IP_REQ_TIMED_OUT: msg = "IP currently timed out"
Case IP_BAD_REQ: msg = "IP Bad Request"
Case IP_BAD_ROUTE: msg = "IP Bad Route"
Case IP_TTL_EXPIRED_TRANSIT: msg = "IP ttl expired transit"
Case IP_TTL_EXPIRED_REASSEM: msg = "IP ttl expired reassem"
Case IP_PARAM_PROBLEM: msg = "IP Parameter Problem"
Case IP_SOURCE_QUENCH: msg = "IP Source Quench"
Case IP_OPTION_TOO_BIG: msg = "IP Option too Big"
Case IP_BAD_DESTINATION: msg = "IP Bad Destination"
Case IP_ADDR_DELETED: msg = "IP addr deleted"
Case IP_SPEC_MTU_CHANGE: msg = "IP Spec Mtu Change"
Case IP_MTU_CHANGE: msg = "IP Mtu Change"
Case IP_UNLOAD: msg = "IP Unload"
Case IP_ADDR_ADDED: msg = "IP Address Added"
Case IP_GENERAL_FAILURE: msg = "IP General Failure"
Case IP_PENDING: msg = "IP Pending"
Case PING_TIMEOUT: msg = "Ping Timeout"
Case Else: msg = "Unknown Message Returned!"
End Select

GetStatusCode = CStr(status) & " [ " & msg & " ]"

End Function

Public Function HiByte(ByVal wParam As Integer)

HiByte = wParam \ &H100 And &HFF&

End Function

Public Function LoByte(ByVal wParam As Integer)

LoByte = wParam And &HFF&

End Function

Public Function Ping(szAddress As String, ECHO As ICMP_ECHO_REPLY) As Long

Dim hPort As Long
Dim dwAddress As Long
Dim sDataToSend As String
Dim iOpt As Long

sDataToSend = "Echo This"
dwAddress = AddressStringToLong(szAddress)

Call SocketsInitialize
hPort = IcmpCreateFile()

If IcmpSendEcho(hPort, _
dwAddress, _
sDataToSend, _
Len(sDataToSend), _
0, _
ECHO, _
Len(ECHO), _
PING_TIMEOUT) Then
Ping = ECHO.RoundTripTime
Else: Ping = ECHO.status * -1
End If

Call IcmpCloseHandle(hPort)
Call SocketsCleanup

End Function
Function AddressStringToLong(ByVal tmp As String) As Long
Dim i As Integer
Dim parts(1 To 4) As String

i = 0

While InStr(tmp, ".") > 0
i = i + 1
parts(i) = Mid(tmp, 1, InStr(tmp, ".") - 1)
tmp = Mid(tmp, InStr(tmp, ".") + 1)
Wend

i = i + 1
parts(i) = tmp

If i <> 4 Then
AddressStringToLong = 0
Exit Function
End If

AddressStringToLong = Val("&H" & Right("00" & Hex(parts(4)), 2) & _
Right("00" & Hex(parts(3)), 2) & _
Right("00" & Hex(parts(2)), 2) & _
Right("00" & Hex(parts(1)), 2))

End Function
Public Function SocketsCleanup() As Boolean
Dim x As Long
x = WSACleanup()
If x <> 0 Then
MsgBox "Windows Sockets error " & Trim$(Str$(x)) & _
" occurred in Cleanup.", vbExclamation
SocketsCleanup = False
Else
SocketsCleanup = True
End If
End Function
Public Function SocketsInitialize() As Boolean
Dim WSAD As WSADATA
Dim x As Integer
Dim szLoByte As String, szHiByte As String, szBuf As String
x = WSAStartup(WS_VERSION_REQD, WSAD)

If x <> 0 Then
MsgBox "Windows Sockets for 32 bit Windows " & _
"environments is not successfully responding."
SocketsInitialize = False
Exit Function
End If

If LoByte(WSAD.wVersion) < WS_VERSION_MAJOR Or _
(LoByte(WSAD.wVersion) = WS_VERSION_MAJOR And _
HiByte(WSAD.wVersion) < WS_VERSION_MINOR) Then

szHiByte = Trim$(Str$(HiByte(WSAD.wVersion)))
szLoByte = Trim$(Str$(LoByte(WSAD.wVersion)))
szBuf = "Windows Sockets Version " & szLoByte & "." & szHiByte
szBuf = szBuf & " is not supported by Windows " & _
"Sockets for 32 bit Windows environments."
MsgBox szBuf, vbExclamation
SocketsInitialize = False
Exit Function
End If

If WSAD.wMaxSockets < MIN_SOCKETS_REQD Then
szBuf = "This application requires a minimum of " & _
Trim$(Str$(MIN_SOCKETS_REQD)) & " supported sockets."
MsgBox szBuf, vbExclamation
SocketsInitialize = False
Exit Function
End If

SocketsInitialize = True
End Function

在timer控制項中放:
Private Sub Timer_Timer()

Dim timeS As Double
Dim ECHO As ICMP_ECHO_REPLY
Dim s As String
s = Form2.ip.Text
Call Ping(s, ECHO)
If ECHO.status <> IP_SUCCESS Then
Form1.WindowState = 0
Form1.Show
Form6.Show
End If

End Sub
看代碼你也能看出來,timer中的Form2.ip.Text就是你要ping的ip地址
Form1.WindowState = 0
Form1.Show
Form6.Show就是當網路不通的時候執行的代碼,你自己看看。

C. 如何用VB代碼判斷計算機是否連接到Internet

VB 檢測是否連接到Internet以及通過何種方式(Modem,LAN,Proxy)連接

'模塊代碼:

Public Declare Function InternetGetConnectedStateEx Lib "wininet.dll" _
Alias "InternetGetConnectedStateExA" _
(ByRef lpdwFlags As Long, _
ByVal lpszConnectionName As String, _
ByVal dwNameLen As Long, _
ByVal dwReserved As Long _
) As Long

Public Enum EIGCInternetConnectionState
INTERNET_CONNECTION_MODEM = &H1&
INTERNET_CONNECTION_LAN = &H2&
INTERNET_CONNECTION_PROXY = &H4&
INTERNET_RAS_INSTALLED = &H10&
INTERNET_CONNECTION_OFFLINE = &H20&
INTERNET_CONNECTION_CONFIGURED = &H40&
End Enum

Public Property Get InternetConnected( _
Optional ByRef eConnectionInfo As EIGCInternetConnectionState, _
Optional ByRef sConnectionName As String _
) As Boolean
Dim dwFlags As Long
Dim sNameBuf As String
Dim lR As Long
Dim iPos As Long

sNameBuf = String$(513, 0)
lR = InternetGetConnectedStateEx(dwFlags, sNameBuf, 512, 0&)
eConnectionInfo = dwFlags
iPos = InStr(sNameBuf, vbNullChar)
If iPos > 0 Then
sConnectionName = Left$(sNameBuf, iPos - 1)
ElseIf Not sNameBuf = String$(513, 0) Then
sConnectionName = sNameBuf
End If
InternetConnected = (lR = 1)
End Property

'窗體代碼:
Dim eR As EIGCInternetConnectionState
Dim sMsg As String
Dim sName As String
Dim bConnected As Boolean

Private Sub Command1_Click()
bConnected = InternetConnected(eR, sName)

If (eR And INTERNET_CONNECTION_MODEM) = INTERNET_CONNECTION_MODEM Then
sMsg = sMsg & "Connection uses a modem." & vbCrLf
End If
If (eR And INTERNET_CONNECTION_LAN) = INTERNET_CONNECTION_LAN Then
sMsg = sMsg & "Connection uses LAN." & vbCrLf
End If
If (eR And INTERNET_CONNECTION_PROXY) = INTERNET_CONNECTION_PROXY Then
sMsg = sMsg & "Connection is via Proxy." & vbCrLf
End If
If (eR And INTERNET_CONNECTION_OFFLINE) = INTERNET_CONNECTION_OFFLINE Then
sMsg = sMsg & "Connection is Off-line." & vbCrLf
End If
If (eR And INTERNET_CONNECTION_CONFIGURED) = INTERNET_CONNECTION_CONFIGURED Then
sMsg = sMsg & "Connection is Configured." & vbCrLf
Else
sMsg = sMsg & "Connection is Not Configured." & vbCrLf
End If
If (eR And INTERNET_RAS_INSTALLED) = INTERNET_RAS_INSTALLED Then
sMsg = sMsg & "System has RAS installed." & vbCrLf
End If

If bConnected Then
Text1.Text = "Connected: " & sName & vbCrLf & vbCrLf & sMsg
Else
Text1.Text = "Not Connected: " & sName & vbCrLf & vbCrLf & sMsg
End If
End Sub

D. VB檢測網路狀態

'請試看這個 添加 Command1 修改下面你要檢測的IP地址

Private Sub Command1_Click()
MsgBox IIf(CheckServ("192.168.1.1"), "伺服器聯線中", "伺服器未聯線") '你的伺服器IP地址
End Sub

Public Function CheckServ(Ipadr As String) As Boolean
Dim aa$, bb$, fname$
CheckServ = False
fname = "c:\tmpfile.txt"
Open "c:\testip.bat" For Output As #1
Print #1, "@echo off"
Print #1, "ping " & Ipadr & " > " & fname
Close #1
If Dir(fname) <> "" Then Kill fname
Call Shell("cmd /c " & "c:\testip.bat", vbHide)
'延時5秒內是否得到文檔
starttm = Timer
Do
DoEvents
If Dir(fname) <> "" Then
If FileLen(fname) > 10 Then Exit Do '得到文檔即退出檢測
End If
Loop Until Timer > = starttm + 5
bb = ""
If Dir(fname) <> "" Then
Open fname For Input As #1
While Not EOF(1)
Line Input #1, aa
bb = bb & aa & vbCrLf
Wend
Close #1
End If
CheckServ = IIf(InStr(bb, "Request") > 0, False, True)
If Dir("c:\testip.bat") <> "" Then Kill "c:\testip.bat"
End Function

E. vb怎樣查看網路連接狀態

Winsock.state 是顯示當前Winsock 和另一主機連接的狀態,它不是顯示主機網路信息的.

用InternetGetConnectedState() 函數可以實現.為了方便你調用下面給模快代碼你吧..

Private Declare Function InternetGetConnectedState Lib "Wininet.dll" (ByVal Flag As Long, ByVal Reserved As Long) As Long
Public Type Rtn_InetStat
IsConnecting As Boolean
IsModenConnecting As Boolean
IsModenBusy As Boolean
IsLANConnecting As Boolean
IsProxyConnecting As Boolean
End Type
Public Function RtnInetStat() As Rtn_InetStat
RtnInetStat.IsConnecting = RtnNunBooleanA(InternetGetConnectedState(0, 0))
RtnInetStat.IsModenConnecting = RtnNunBooleanB(InternetGetConnectedState(1, 0))
RtnInetStat.IsLANConnecting = RtnNunBooleanB(InternetGetConnectedState(2, 0))
RtnInetStat.IsProxyConnecting = RtnNunBooleanA(InternetGetConnectedState(4, 0))
RtnInetStat.IsModenBusy = RtnNunBooleanA(InternetGetConnectedState(8, 0))
End Function
Private Function RtnNunBooleanA(ByVal Num As Long) As Boolean
If Num = 0 Then
RtnNunBooleanA = False
Else
RtnNunBooleanA = True
End If
End Function
Private Function RtnNunBooleanB(ByVal Num As Long) As Boolean
If Num = 0 Then
RtnNunBooleanB = True
Else
RtnNunBooleanB = False
End If
End Function

獲取當前網路是否已連接上:
Msgbox RtnInetStat.IsConnecting

F. VB怎麼檢查網路連接狀態

如果是檢查winsock的連接狀態可以用,if winsock1.state=*
sckClosed 0 預設的。關閉
sckOpen 1 打開
sckListening 2 偵聽
sckConnectionPending 3 連接掛起
sckResolvingHost 4 識別主機
sckHostResolved 5 已識別主機
sckConnecting 6 正在連接
sckConnected 7 已連接
sckClosing 8 同級人員正在關閉連接
sckError 9 錯誤

*值得就是上述值的一個,然後在後面添加代碼!例如要判斷時候關閉,就可以
if winsock1.state=0 then msgbox "未連接!"
這樣的沒有連接就會彈出對話框了

G. 想用VB作做一個網路連接的診斷問題

Public Declare Function IcmpCreateFile Lib "icmp.dll" () As Long
Public Declare Function IcmpCloseHandle Lib "icmp.dll" (ByVal IcmpHandle As Long) As Long
Public Declare Function IcmpSendEcho Lib "icmp.dll" (ByVal IcmpHandle As Long, ByVal DestinationAddress As Long, ByVal RequestData As String, ByVal RequestSize As Integer, ByVal RequestOptions As Long, ReplyBuffer As ICMP_ECHO_REPLY, ByVal ReplySize As Long, ByVal Timeout As Long) As Long

Public Type ICMP_ECHO_REPLY
Address As Long
status As Long
RoundTripTime As Long
Data As String * 250
End Type

Function AddressStringToLong(ByVal tmp As String) As Long
Dim i As Integer
Dim parts(1 To 4) As String
i = 0
While InStr(tmp, ".") > 0
i = i + 1
parts(i) = Mid(tmp, 1, InStr(tmp, ".") - 1)
tmp = Mid(tmp, InStr(tmp, ".") + 1)
Wend
i = i + 1
parts(i) = tmp
If i <> 4 Then
AddressStringToLong = 0
Exit Function
End If
AddressStringToLong = Val("&H" & Right("00" & Hex(parts(4)), 2) & Right("00" & Hex(parts(3)), 2) & Right("00" & Hex(parts(2)), 2) & Right("00" & Hex(parts(1)), 2))
End Function

Public Function Ping(szAddress As String, ECHO As ICMP_ECHO_REPLY) As Long
Dim hPort As Long
Dim dwAddress As Long
Dim sDataToSend As String
sDataToSend = "My Request"
dwAddress = AddressStringToLong(szAddress)
hPort = IcmpCreateFile()
If IcmpSendEcho(hPort, dwAddress, sDataToSend, Len(sDataToSend), 0, ECHO, Len(ECHO), 4000) Then
'Ping如果成功,Status返回0,RoundTripTime是Ping完成的時間,單位為Ms,Data是返回的數據,Address是接受響應的Ip地址,DataSize是接受數據,Data的大小.
Ping = ECHO.RoundTripTime
Else: Ping = ECHO.status * -1
End If
Call IcmpCloseHandle(hPort)
End Function

』『請將上面內容放入一個模塊

'在窗體上放一個command調用

Private Sub Command1_Click()
Dim ECHO As ICMP_ECHO_REPLY
Ping "192.168.0.1", ECHO

If ECHO.Status = 0 Then
MsgBox "網路是通的 "
Else
MsgBox "網路是不通的"
End If

End Sub
這是我使用的 供你參考 字體紅綠 自己做吧 如有疑問 聯系我

H. vb.net中如何判斷網路連接

新建模塊
Function IsHearOK(ByVal URL As String) As Boolean '判斷網頁是否存在函數
Dim XMLObject As Object, ReturnType As String
XMLObject = CreateObject("Microsoft.XMLHTTP")
XMLObject.Open("GET", URL, False)
XMLObject.setRequestHeader("CONTENT-TYPE", "application/x-www-form-urlencoded")
XMLObject.setRequestHeader("Range", "bytes=1-255")
Try
XMLObject.Send()
If XMLObject.Status = 200 Or XMLObject.Status = 206 Then
ReturnType = XMLObject.getResponseHeader("CONTENT-TYPE")
If UCase(ReturnType) <> "TEXT/HTML" Then
IsHearOK = True
Else
IsHearOK = False
End If
Else
IsHearOK = False

End If
Catch
MsgBox("連接異常,請檢查網路!", , "提醒")
XMLObject = Nothing

End Try
End Function

調用 ishearok(url)=true 正常

I. vb怎麼判斷網路是否已經連接上

GetHostbyName API可獲取域名對應的IP地址,當沒有聯網狀態將會返回一個錯誤值。所以可利用它來判斷是否聯網。

Private Sub Form_Load()
If IsConnectedState Then
MsgBox "連接網路"
Else
MsgBox "沒有聯網"
End If
End Sub

VBScript code復制代碼

Option Explicit

Private Type WSADATA
wversion As Integer
wHighVersion As Integer
szDescription(0 To 256) As Byte
szSystemStatus(0 To 128) As Byte
iMaxSockets As Integer
iMaxUdpDg As Integer
lpszVendorInfo As Long
End Type

Private Declare Function WSAStartup Lib "WSOCK32.DLL" (ByVal wVersionRequired As Integer, lpWSAData As WSADATA) As Long
Private Declare Function WSACleanup Lib "WSOCK32.DLL" () As Long
Private Declare Function gethostbyname Lib "WSOCK32.DLL" (ByVal szHostname As String) As Long
Private Const WS_VERSION_REQD = &H101

Public Function IsConnectedState() As Boolean
Dim udtWSAD As WSADATA
Call WSAStartup(WS_VERSION_REQD, udtWSAD)
IsConnectedState = CBool(gethostbyname("www..com"))
Call WSACleanup
End Function

閱讀全文

與vb檢測網路連接相關的資料

熱點內容
驅動網路異常怎麼解決win10 瀏覽:743
計算機網路公司上班照片 瀏覽:499
電信光貓wifi連上了但是沒有網路 瀏覽:366
sim卡無法連接網路 瀏覽:587
無法讀取網路連接伺服器 瀏覽:309
無線網路優化路測作用 瀏覽:185
廊坊市華通計算機網路咨詢 瀏覽:42
網路共享失敗怎麼回事 瀏覽:422
wifi和移動網路怎麼扣通用流量 瀏覽:815
電腦怎麼能使用移動網路 瀏覽:94
網路歌手雙笙是哪個公司的 瀏覽:625
北大網路教育如何報名 瀏覽:779
主動連接質量好的網路 瀏覽:658
網路seo公司報價多少錢 瀏覽:447
網路的延遲是多少 瀏覽:113
中國網路貸款有多少沒收上的 瀏覽:642
贛州銀行網路異常 瀏覽:963
計算機網路技術與應用胡維華 瀏覽:942
電腦工作網路位置安全嗎 瀏覽:927
甘南哪個網路好 瀏覽:381

友情鏈接