VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



: Disconnect from a dial-up networking connection without any API call.

by Osama A.Karim (2 Submissions)
Category: Internet/HTML
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Fri 4th August 2000
Date Added: Mon 8th February 2021
Rating: (1 Votes)

: Disconnect from a dial-up networking connection without any API call.

Rate : Disconnect from a dial-up networking connection without any API call.



'e-mail: [email protected]
'webpage: www.homestead.com/freeprogtutorials

Private Sub Form_Load()
    Dim strDUNName As String
    strDUNName = InputBox("Enter the dial-up network name.")
    If DisconnectDUN(strDUNName) = True Then
        MsgBox "Disconnected properly"
    Else
        MsgBox "Can't Disconnect"
    End If
    End
End Sub

Function DisconnectDUN(DUNName As String) As Boolean
    On Error GoTo errhandler
    AppActivate "Connected to " & DUNName 'Set the focus to dial-up connection window
    SendKeys "c" 'Click disconnect button
    DisconnectDUN = True 'Function done successfully
errhandler:
End Function



Download this snippet    Add to My Saved Code

: Disconnect from a dial-up networking connection without any API call. Comments

No comments have been posted about : Disconnect from a dial-up networking connection without any API call.. Why not be the first to post a comment about : Disconnect from a dial-up networking connection without any API call..

Post your comment

Subject:
Message:
0/1000 characters