Buonasera ho un problema.
Ho dei computer in rete e vorrei ogni tanto interrogarli per vedere se sono acnora connessi alla rete dato che in wi fi la rete cade spesso.
Hotrovato qualcosa ma non funziona
' Usage
Dim value As Boolean = My.Computer.Network.Ping(hostNameOrAddress)
Dim value As Boolean = My.Computer.Network.Ping(address)
Dim value As Boolean = My.Computer.Network.Ping(hostNameOrAddress ,timeout)
Dim value As Boolean = My.Computer.Network.Ping(address ,timeout)
' Declaration
Public Function Ping( _
ByVal hostNameOrAddress As String _
) As Boolean
' -or-
Public Function Ping( _
ByVal address As System.Uri _
) As Boolean
' -or-
Public Function Ping( _
ByVal hostNameOrAddress As String, _
ByVal timeout As Integer _
) As Boolean
' -or-
Public Function Ping( _
ByVal address As System.Uri, _
ByVal timeout As Integer _
) As Boolean
if My.Computer.Network.Ping("198.01.01.01") Then
MsgBox("Server pinged successfully.")
Else
MsgBox("Ping request timed out.")
End If
non riesco a trovare l' oggetto my.computer.network ecc qualcuno ha idea ?
grazie
|