17-10-12, 06:09 PM
كاتب الموضوع : Boutemine Oualid
السلام عليكم و رحمة الله وبركاتهكود :
private Sub pingServer(ByVal adress As String, ByVal timeout As Int32)
If My.Computer.Network.IsAvailable Then
Try
If My.Computer.Network.Ping(adress, timeout) Then
MsgBox(adress & vbCrLf & "ok", MsgBoxStyle.Information, Me.Text)
Else
MsgBox(adress & vbCrLf & "failled", MsgBoxStyle.Exclamation, Me.Text)
End If
Catch ex As Exception
MessageBox.Show(ex.Message, Me.Text, MessageBoxButtons.OK, MessageBoxIcon.Error)
End Try
End If
End Sub