منتدى فيجوال بيسك لكل العرب | منتدى المبرمجين العرب

نسخة كاملة : لعمل Ping لسيرفر
أنت حالياً تتصفح نسخة خفيفة من المنتدى . مشاهدة نسخة كاملة مع جميع الأشكال الجمالية .
كاتب الموضوع : 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