|
Home > Archive > Programming with dBASE > November 2005 > Internet connection detection
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Internet connection detection
|
|
|
| My application will depend on having live highspeed internet connection.
But when they lose their connection, I need to alert the user with a popup message, that they've lost their internet connection - so they can't access the program at this time. Does anyone have any ideal how to do this?
| |
| Fred van der Meulen 2005-11-08, 9:24 am |
| Hello M.
"M.C" < charlesmann3176@yaho
o.ca> schreef in bericht
news:lsim2OP4FHA.1352@news-server...
> My application will depend on having live highspeed internet connection.
> But when they lose their connection, I need to alert the user with a popup
> message, that they've lost their internet connection - so they can't
> access the program at this time. Does anyone have any ideal how to do
> this?
Try the following function:
****************
Function IsConnected
/*
Check connection to internet
returns:
false not connected
true connected via modem/lan
uses:
InternetConnectedSta
te()
Version
1.0 08/29/2000
Programmers:
Romain Strieff [dBVIPS]
*/
return InternetConnectedSta
te()>0
Function InternetConnectedSta
te
/*
Check connection to internet
returns:
0 not connected
1 connected via modem
2 connected via Lan/cable
use like this:
if InterNetConnectedSta
te>0
do download
else
do make_connection
endif
Or check the difference between
modem (slow) and Lan(fast) to
decide which actions to start
Version
1.0 08/29/2000
Programmers:
Romain Strieff [dBVIPS]
*/
If type(" InternetGetConnected
State") # "FP"
Extern cLong ;
InternetGetConnected
State;
(cLong,cLong) "wininet.dll"
endif
return InternetGetConnected
State(0,0)
****************
Regards,
Fred.
|
|
|
|
|