Results 1 to 4 of 4

Thread: Internet connection notification

  1. #1

    Thread Starter
    New Member
    Join Date
    Nov 2007
    Posts
    2

    Internet connection notification

    Hey, how do I know in vb when the comptuer connects to the internet, or check if it is already connected.

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Internet connection notification

    Welcome to the forums.

    VB what?

    VB6?

    VB.NET?

  3. #3
    PowerPoster Fazi's Avatar
    Join Date
    Aug 2005
    Location
    Underworld
    Posts
    2,525

    Re: Internet connection notification

    If VB6, Use this
    Code:
    Private Const FLAG_ICC_FORCE_CONNECTION = &H1
    Private Declare Function InternetCheckConnection Lib "wininet.dll" Alias "InternetCheckConnectionA" (ByVal lpszUrl As String, ByVal dwFlags As Long, ByVal dwReserved As Long) As Long
    Private Sub Form_Load()
        'KPD-Team 2001
        'URL: http://www.allapi.net/
        'E-Mail: [email protected]
        If InternetCheckConnection("http://www.allapi.net/", FLAG_ICC_FORCE_CONNECTION, 0&) = 0 Then
            MsgBox "Not connected ", vbInformation
        Else
            MsgBox "Connected", vbInformation
        End If
    End Sub

  4. #4
    New Member
    Join Date
    Nov 2007
    Posts
    2

    Re: Internet connection notification

    if your using VB2005, look at the My.Computer namespace, you should find what you need there

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width