Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Dialing-up using the modem

Posted on 1999-07-26
10
Medium Priority
?
147 Views
Last Modified: 2010-04-30
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?
0
Comment
Question by:chaiti_c
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4
10 Comments
 
LVL 9

Expert Comment

by:Dalin
ID: 1527425
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

0
 

Author Comment

by:chaiti_c
ID: 1527426
This is the windows dial-up? Can't I do it completely through VB and not using this windows application?
0
 

Author Comment

by:chaiti_c
ID: 1527427
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
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 9

Expert Comment

by:Dalin
ID: 1527428
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?
0
 

Author Comment

by:chaiti_c
ID: 1527429
My application needs redialling and so it needs to be within the VB code. That is the clients requirement
0
 
LVL 9

Expert Comment

by:Dalin
ID: 1527430
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.
0
 

Author Comment

by:chaiti_c
ID: 1527431
I am doing it from within Visual Basic. Moreover the command did not work as I have specified earlier
0
 
LVL 9

Expert Comment

by:Dalin
ID: 1527432
chaiti_c,
Could you post your code so I can test it?  It works on mine .
Regards
0
 
LVL 3

Accepted Solution

by:
kfrick earned 600 total points
ID: 1527433
If you need to connect to the remote device as a Windows Nnetworked resource, then Dalin's method is the way to go.....

On the other hand, if you are writing both sides of the code, or the remote device is not a Windows device, then you can easily issue commands to the Modem using the MSComm Object. Lookup "Hayes Command Set" on the Web for a list of common modem commands.

If this sounds like what you're after and you need more info, i can help....

-kf
0
 

Author Comment

by:chaiti_c
ID: 1527434
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?
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Suggested Courses

671 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question