Internet DialUp


Private Declare Function InternetAutodial Lib “wininet.dll” (ByVal dwFlags As Long, ByVal dwReserved As Long) As Long
Private Const INTERNET_AUTODIAL_FORCE_ONLINE = 1
Private Const INTERNET_AUTODIAL_FORCE_UNATTENDED = 2
Private Declare Function InternetAutodialHangup Lib “wininet.dll” (ByVal dwReserved As Long) As Long

Private Sub Command1_Click()

    ‘ To prompt the user to connect to the Net
   
    If InternetAutodial(INTERNET_AUTODIAL_FORCE_ONLINE, 0) Then
        MsgBox “You’re Connected!”, vbInformation
    End If
   
    ‘ To automatically start dialling
   
    If InternetAutodial(INTERNET_AUTODIAL_FORCE_UNATTENDED, 0) Then
        MsgBox “You’re Connected!”, vbInformation
    End If
   
    ‘ To disconnect an automatically dialled connection
   
    If InternetAutodialHangup(0) Then
       MsgBox “You’re Disconnected!”, vbInformation
    End If

End Sub

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s