Is my PDA connected ?

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
 
H

Harry Simpson

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top