Is my PDA connected ?

  • Thread starter Thread starter john
  • Start date Start date
J

john

Hello,

I'm going to use compact framework for a windows
application.
The PDA should be aware when it is connected or not to the
wireless network.
How can i do that ?
Any idea or URL ?
thanks,
john
 
Try this John:

Private Sub CheckConnection()

' Initialize the WebRequest.

Dim myRequest As HttpWebRequest =
HttpWebRequest.Create("http://www.google.com")

'return to regular cursor

Cursor.Current = Cursors.WaitCursor

' Return the response.

Dim myResponse As HttpWebResponse = myRequest.GetResponse()

'return to regular cursor

Cursor.Current = Cursors.Default

If myResponse.StatusCode = HttpStatusCode.OK Then

g_blnConnected = True

Else

g_blnConnected = False

End If

myResponse.Close()

End Sub



HTH

Harry Simpson, MCSD
 
Back
Top