Results 1 to 2 of 2

Thread: "Shell rundll32 rnaui.dll,RnaDial" opens two windows??

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Aug 2000
    Posts
    225

    Question

    Two dialup windows open when I do the following:
    Shell "rundll32.exe rnaui.dll,RnaDial " & strConnectName

    This causes a problem when using SendKeys "{ENTER}",1 to start the connection process.

    Anybody have any suggestions on how to fix this problem or how to force a connection without the users input.
    (I do allow the user to choose the dialup connection they want, hence strConnectName)

    Thanks

  2. #2
    Guest
    Try:

    Code:
    Private Sub Command1_Click()
    Dim X
    '"ConnectionName" is the name under the icon in Dial-up Networking
    X = Shell("rundll32.exe rnaui.dll,RnaDial " & "ConnectionName", 1)
    DoEvents
    'You can type in your password before the { below.
    SendKeys "{enter}", True
    DoEvents
    End Sub
    Or this code is suppose to start a connection automatically:

    Code:
    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
    [Edited by Matthew Gates on 08-11-2000 at 01:49 PM]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width