Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Is there an internet connection

Posted on 2008-10-03
6
Medium Priority
?
164 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 1000 total points
ID: 22634187
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
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…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Suggested Courses

719 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