By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,301 Members | 3,690 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,301 IT Pros & Developers. It's quick & easy.

internet connection

P: n/a
Fei
Hi,

I have a question about internet connection. I have my application
running in WindowsXP pro. How can I make my application raise a messagebox
when the internet connection goes down? Please help me out.

Thanks !

Fei
Nov 20 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
You would have to Ping your Gateway at an intervall I guess.. and if that
times out you could asume you are not connected anymore!

So you have to find out how to ping.. and then just do that every minute or
so with a Timer.

/Try Guy
"Fei" <fw***@NOSPAMcsystemssoftware.com> skrev i meddelandet
news:%2***************@tk2msftngp13.phx.gbl...
Hi,

I have a question about internet connection. I have my application
running in WindowsXP pro. How can I make my application raise a messagebox when the internet connection goes down? Please help me out.

Thanks !

Fei

Nov 20 '05 #2

P: n/a
Since you mention Internet, I'm going to assume you are not talking about your
Network.
You might be able to get away with this pinging the Gateway, maybe not.
Depending upon your network infrastructure, it is entirely possible that your
gateway would be alive and well but not your external connection. So the more
reliable method would be to contact an external server.
However, you might need to know the specifics of the external connection as
well.
Many firewalls and/or routers will not respond to or pass along ICMP Ping
requests.
In addition, over a period of time the firewall might interpret the high volume
of pings to be a pre-cursor to a Denial Of Service attack and might stop
responding to your pings. Worst yet, it might add your IP to a blacklist.

Gerald

"Try Guy" <no****@no.no> wrote in message
news:ea**************@tk2msftngp13.phx.gbl...
You would have to Ping your Gateway at an intervall I guess.. and if that
times out you could asume you are not connected anymore!

So you have to find out how to ping.. and then just do that every minute or
so with a Timer.

/Try Guy
"Fei" <fw***@NOSPAMcsystemssoftware.com> skrev i meddelandet
news:%2***************@tk2msftngp13.phx.gbl...
Hi,

I have a question about internet connection. I have my application
running in WindowsXP pro. How can I make my application raise a

messagebox
when the internet connection goes down? Please help me out.

Thanks !

Fei


Nov 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.