Link to home
Start Free TrialLog in
Avatar of chaiti_c
chaiti_c

asked on

Dialing-up using the modem

I want to set up a connection between the client and server using the telephone lines(along with the modem). The application should ring up the number internally stored and set the connection. How do I do it using Visual Basic?
Avatar of Dalin
Dalin

1. in myComputer, go to dial-up connection, create a new connection, give it a name say "MyNewServer"

2, in your VB's form load (or whereever you want to make the connection to the serve, add the code:


       Dim X
       X = Shell("rundll32.exe rnaui.dll,RnaDial " & "MyNewServer", 1)
' Wait for the connecting window to come out
       DoEvents
       SendKeys "{enter}", True

Avatar of chaiti_c

ASKER

This is the windows dial-up? Can't I do it completely through VB and not using this windows application?
After I used the code, as advised by you, the dial up window is not opening up. Instead it is going into an infinite loop. I am using VB6 on windows98.
Can you please help
Your dial-Up connection is a one time job. Once it is there, you can always call it. So it really does not make sense for you to code VB to go through the setup.

Make sure the name of your connection is the same.   Can you post the code you are using?
My application needs redialling and so it needs to be within the VB code. That is the clients requirement
Your dial up connection can be used for redialling, again and Again... Just like your computer's printer, once you add (set -up) the printer in your printer spool, you can use it any time.    

Have you added the connection? It does not have to be the connection it exist, just add a new one and name it different from the ones already there.  Once you set up, you can use it again and again, unless some delete it, in which case you need to set up again.
I am doing it from within Visual Basic. Moreover the command did not work as I have specified earlier
chaiti_c,
Could you post your code so I can test it?  It works on mine .
Regards
ASKER CERTIFIED SOLUTION
Avatar of kfrick
kfrick

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Yes I am trying to use the port Controls of the modem. I want to dial up using the port control and then invoke the ftp. To invoke the ftp I am using a batch file but can I do it using Visual basic Inet as well? Moreover using the com control I would like the interact with FTP. If this is possible can you please help?