1. Visual Basic.Net

Memeriksa status koneksi internet VB.Net

Ini adalah potongan kode sederhana untuk memeriksa status dari koneksi internet dengan menggunakan VB.Net

Source Code

Module Module1

    Private Declare Function InternetGetConnectedState _
        Lib "wininet.dll" (ByRef lpdwFlags As Integer, ByVal dwReserved As Integer) As Integer

    Private Function IsConnected() As String
        IsConnected = InternetGetConnectedState(0, 0)
        If IsConnected = 1 Then
            'Jika terkoneksi internet
            Return "Koneksi OK"
            'Jika tidak terkoneksi internet
            Return ("Koneksi Tidak OK")
        End If
    End Function

    Sub Main()
    End Sub

End Module
Comments to: Memeriksa status koneksi internet VB.Net

    Your email address will not be published. Required fields are marked *

    Attach images - Only PNG, JPG, JPEG and GIF are supported.