Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VFP - How to check whether you have internet connection or not?

Status
Not open for further replies.

MohdSuffian

Programmer
Aug 15, 2019
2
MY
thread184-263679

create a function called checkinternet status

PROCEDURE checkinternetstatus
DECLARE INTEGER InternetGetConnectedState IN WinInet INTEGER @lpdwFlags, INTEGER dwReserved
LOCAL lnFlags, lnReserved, lnSuccess
lnFlags=0
lnReserved=0
lnSuccess=InternetGetConnectedState(@lnFlags,lnReserved)
RETURN lnSuccess
ENDPROC

***** to check, call the function like this:
IF thisform.checkInternetStatus() = 1
*** if there is internet connection

ELSE
*** if there is no internet connection

ENDIF


Got this from

thanks
mohd suffian
 
Was there a question here?



If you want to get the best response to a question, please check out FAQ184-2483 first.
 
There is no question, Mike, because this post is a helpful tip and marked as that with the light bulb icon.

Aside of that, Mohd Suffian, you may have searched and seen your answer already is part of the more recent thread184-1797993.

Bye, Olaf.



Olaf Doschke Software Engineering
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top