http://www.vbip.com/wininet/wininet_connection_01.asp
OR
Imports System.Manageme nt
Public Function GetSignalStreng th() As String
On Error Resume Next
Dim query As ManagementObjec tSearcher
Dim Qc As ManagementObjec tCollection
Dim Oq As ObjectQuery
Dim Ms As ManagementScope
Dim Co As ConnectionOptio ns
Dim Mo As ManagementObjec t
Dim outp As String
Co = New ConnectionOptio ns
Ms = New ManagementScope ("root\wmi")
Oq = New ObjectQuery("SE LECT * FROM MSNdis_80211_Re ceivedSignalStr ength
Where active=true")
query = New ManagementObjec tSearcher(Ms, Oq)
Qc = query.Get
For Each Mo In query.Get
outp = outp & Mo("Ndis80211Re ceivedSignalStr ength") & " "
ISIPActive = Mo("Active")
Next
Return outp.Trim()
End Function
OR
http://msdn.microsoft.com/library/de...connection.asp
Private Sub GetNetworkStatu s()
Dim moReturn As Management.Mana gementObjectCol lection
Dim moSearch As Management.Mana gementObjectSea rcher
Dim mo As Management.Mana gementObject
moSearch = New Management.Mana gementObjectSea rcher("Select * from
Win32_NetworkCo nnection")
moReturn = moSearch.Get
For Each mo In moReturn
Dim strOut As String
strOut = String.Format(" {0} - Status {1}", mo("Name").ToSt ring,
mo("Status").To String)
Trace.WriteLine (strOut)
Next
End Sub
Here is a link to see if you are connected to a network that uses a
ping
http://msdn.microsoft.com/library/de...dunplugged.asp
"Al" <Al@discussions .microsoft.com> wrote in message
news:28******** *************** ***********@mic rosoft.com:
Hi,
Is there any way to detected if a device is connected? How would I query
to
see the device is connected to network. My application is mobile and
mostly
on wireless connection but it could be wired as well. Any Help would be
appreciated.
Regards
Al