Hello all,

I want to implement to my application the following features:

1. Internet Connectivity Checker.

2. Online Updates Controller.
Checks at the background -silently- each time the application is loaded, for existance of a specific file (let's name it as: update.xml) on the server (eg. myserver.com/updates). If there is no update, nothing is done (no popups, no message boxes...nada..) but if there is the update.xml file, user is informed with a simple text on StatusBar ("There is an update available"). That's all.

I've already found the code for Internet connectivity, here it is:
VB Code:
  1. Private Declare Function InternetGetConnectedState Lib "wininet" _
  2.         (ByRef dwFlags As Long, ByVal dwReserved As Long) As Long
  3.  
  4.     'Define possible connection types
  5.     Private Enum ConnectStates
  6.         LAN = &H2
  7.         Modem = &H1
  8.         Proxy = &H4
  9.         Offline = &H20
  10.         Configured = &H40
  11.         RasInstalled = &H10
  12.     End Enum
  13.  
  14.     Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
  15.         Dim lng_dwFlags As Long
  16.         Dim blnConnected As Boolean = (InternetGetConnectedState(lng_dwFlags, 0&) <> 0)
  17.         Dim strMessage As String
  18.         Dim ConnectionType As ConnectStates
  19.  
  20.         If blnConnected Then
  21.             strMessage += "Computer is Connected" & ControlChars.NewLine
  22.  
  23.             'Display the connection flags
  24.             strMessage += "Connection Flags: " & ControlChars.NewLine
  25.             For Each connectiontype In _
  26.                 System.Enum.GetValues(GetType(ConnectStates))
  27.                 If (ConnectionType And lng_dwFlags) = ConnectionType Then
  28.                     strMessage += "     " & ConnectionType.ToString() & ControlChars.NewLine
  29.                 End If
  30.             Next
  31.         End If
  32.  
  33.         MessageBox.Show(strMessage)
  34.     End Sub
Code from: http://www.timkey.net/Community/dotnet/260.aspx

Thanks a lot for your help!