TEK TABANCA
Uzman Üye
Bağlanıtın Var Olup Olmadığını Gösterir
Kod:
Public Function BaglantiKontrol() As Boolean
Dim yol As New System.Uri("https://www.google.com/ ")
' RazorCral-EmirAYildiz
Dim istek As System.Net.WebRequest
istek = System.Net.WebRequest.Create(yol)
Dim Cevap As System.Net.WebResponse
Try
Cevap = istek.GetResponse
Cevap.Close()
istek = Nothing
Return True
Catch ex As Exception
istek = Nothing
Return False
End Try
End Function