Solved

Is there an internet connection

Posted on 2008-10-03
6
159 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
ScreenConnect 6.0 Free Trial

Check out the updates in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI that improves session organization and overall user experience. See the enhancements for yourself!

 
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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
delphi exception 7 64
Communication Between RC4 Delphi <-> PHP 3 114
How to renew a Delphi rad-studio licence? 5 65
How to load 2 images in same column in Delphi 2 47
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.

777 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