title: Check Internet Connection vb.net
body: <p>I am trying to run some vb.net code that indicates if i'm connected to the internet</p>
  
  <pre><code>If My.Computer.Network.IsAvailable Then
      MsgBox("Computer is connected.")
  Else
      MsgBox("Computer is not connected.")
  End If
  </code></pre>
  
  <p>This works fine if I'm connecting to a WiFi signal that doesn't require a login. If I connect to a public WiFi signal that I'm required to login/pay and I execute the code before completing this step it still tells me I'm connected (in theory yes but without paying/logging in I'm not)</p>
  
  <p>Any ideas how set this up?</p>
  
  <p>Thanks</p>