|
-
May 29th, 2001, 05:31 PM
#1
Thread Starter
New Member
Question for VB Gurus
Hi,
I am a Student learning Visual Basic, working on a project, I can do my own research, i just need someone to point me to the right direction. I would really appreciate any help..thx
here is the scenario.
I want to be able to detect a DNS error or when a User launches Internet Explorer and it does not load the page. I have looked into API calls and can detect when Internet Explorer has been launched or can detect when computer is not connected to the net, But No referece yet to any calls on Internet Explorer DLL's so I can poll if Internet Explorer failed to load page.
p.s. remember my app is not launchin IE, it just has to detect if user has launched it and it has failed.
thx
-
May 29th, 2001, 09:33 PM
#2
PowerPoster
Add the appropriate API declarations:
Forget who posted this..
Code:
Public Function Online() As Boolean
'// If you are online it will return True, otherwise False
Online = InternetGetConnectedState(0&, 0&)
End Function
Public Function ViaLAN() As Boolean
Dim SFlags As Long
Call InternetGetConnectedState(SFlags, 0&) '// return the flags associated with the connection
ViaLAN = SFlags And INTERNET_CONNECTION_LAN '// True if the Sflags has a LAN connection
End Function
Public Function ViaModem() As Boolean
Dim SFlags As Long
Call InternetGetConnectedState(SFlags, 0&) '// return the flags associated with the connection
ViaModem = SFlags And INTERNET_CONNECTION_MODEM '// True if the Sflags has a modem connection
End Function
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|