Solved

Is there an internet connection

Posted on 2008-10-03
6
158 Views
Last Modified: 2012-05-05
I would like to add code to my application to test whether there is an active internet connection or not.
My application does some internet related functionality and I want to be sure that there is a connection prior to executing this functionality.

I can find lots of routines...but which is the best method?
0
Comment
Question by:geocoins-software
  • 3
  • 2
6 Comments
 
LVL 16

Expert Comment

by:JoWickerman
ID: 22634039
HI,

Perform a ping to test connectivity.

ping microsoft.com

I used it once... Although it was in VB.

Hope this is useful.

Cheers,
0
 

Author Comment

by:geocoins-software
ID: 22634075
How about some code on how to do it?
0
 
LVL 21

Accepted Solution

by:
ziolko earned 250 total points
ID: 22634187
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 16

Expert Comment

by:JoWickerman
ID: 22634231
Well... VB code is:

My.Computer.Network.Ping("207.46.232.182")

Cheers
0
 

Author Comment

by:geocoins-software
ID: 22634248
well, im not looking for VB code.....and since this is a Delphi zone......enough said.
0
 

Author Closing Comment

by:geocoins-software
ID: 31502761
I used InternetGetConnectedState - it works great - thanks!
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now