Click to See Complete Forum and Search --> : Check PC is connect to internet in VB6?


October 20th, 1999, 06:19 AM
Hi, friends

My application is using VB6. How to check if
the PC is connect to internet?

I attempt use Inet or Webbrowser. It seemed they
have no such properties or methods.

Thanks
zys

Lothar Haensler
October 20th, 1999, 06:30 AM
there is an Internetgetconnectedstate api in wininet.dll.

October 20th, 1999, 10:39 PM
Thanks.
I programming here:

Public Declare Function InternetGetConnectedState Lib "wininet.dll" (lpdwFlags
as Long, byval dwReserved as Long) as Boolean
Dim ll as long
Dim ret as Boolean
ret = InternetGetConnectedState(ll, 0)


ret is always False.
and I want to see what value INTERNET_CONNECTION_LAN is.

Msgbox INTERNET_CONNECTION_LAN

it display nothing. Then I try this InternetAttemptConnect(0),
it return nothing too. If I need include some others?


zys