Private Declare Function InternetGetConnectedState Lib "wininet.dll" (ByRef lpdwFlags As Long, ByVal dwReserved As Long) As Long

Private Function IsConnected() As Boolean
IsConnected = InternetGetConnectedState(0, 0)
End Function
'使用方法:
Private Sub Command1_Click()
MsgBox IsConnected
End Sub
'如果電腦已上網會傳回true,否則傳回false。

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 colud77 的頭像
    colud77

    I-Cloud程式攻略

    colud77 發表在 痞客邦 留言(0) 人氣()