|
-
Nov 15th, 2007, 02:17 AM
#1
Thread Starter
New Member
Internet connection notification
Hey, how do I know in vb when the comptuer connects to the internet, or check if it is already connected.
-
Nov 15th, 2007, 07:09 AM
#2
Re: Internet connection notification
Welcome to the forums. 
VB what?
VB6?
VB.NET?
-
Nov 15th, 2007, 02:17 PM
#3
Re: Internet connection notification
If VB6, Use this
Code:
Private Const FLAG_ICC_FORCE_CONNECTION = &H1
Private Declare Function InternetCheckConnection Lib "wininet.dll" Alias "InternetCheckConnectionA" (ByVal lpszUrl As String, ByVal dwFlags As Long, ByVal dwReserved As Long) As Long
Private Sub Form_Load()
'KPD-Team 2001
'URL: http://www.allapi.net/
'E-Mail: [email protected]
If InternetCheckConnection("http://www.allapi.net/", FLAG_ICC_FORCE_CONNECTION, 0&) = 0 Then
MsgBox "Not connected ", vbInformation
Else
MsgBox "Connected", vbInformation
End If
End Sub
-
Nov 16th, 2007, 07:21 PM
#4
New Member
Re: Internet connection notification
if your using VB2005, look at the My.Computer namespace, you should find what you need there
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
|