This is my first real post on “Visual Basic 6 Tips & Tricks” category 🙂
In many cases you need to check if the computer on which your VB6 application runs has an active Internet connection ( example : you have a small VB6 application that connects to a web server to retrieve the current weather ). To check this we need to use the InternetGetConnectedStateEx API function which will return 0 ( false ) if there is no connection or 1 ( true ) if there is an Internet connection.
span style=”color: #ff0000;”>"wininet.dll"
To use it just call it without any parameters, like below :
span style=”color: #ff0000;”>"We have an active Internet connection!""We don’t have an active Internet connection!"
That’s all 🙂