Solved

How to receive incoming calls using mscomm control

Posted on 2002-07-10
5
286 Views
Last Modified: 2008-01-09
Hi,
I'm using MSCOMM control for my dialer program.

the following is my vb settings:-
   MSComm1.CommPort = 3
   MSComm1.Settings = "9600,N,8,1"
   MSComm1.InputLen = 0
   MSComm1.RTSEnable = True    'must
   MSComm1.PortOpen = True
   
this one is a call
   MSComm1.Output = "ATDT" + Trim(Text1.Text) + Chr$(13)
and this is on my timer
   If MSComm1.InBufferCount Then
        MsgBox (MSComm1.Input)
   End If
at this stage, i can call any phone number and also can send & receive msg to & from other party.

but when other party call my program, i don't know how to pickup or receive the call. for a start can somebody show how to pop up a message when there is a incoming calls.

0
Comment
Question by:azsoft
5 Comments
 
LVL 28

Accepted Solution

by:
vinnyd79 earned 50 total points
ID: 7143234
0
 
LVL 4

Expert Comment

by:AlonHirsch
ID: 7145309
Hi,

The MSCOMM Control raises events when ever anything happens on the COM port.
The Event is _OnCom

You have to detect a RING on the modem (comEvRing) and when it is received, you need to issues an ANSWER modem instruction (ATA).

If you set the RTThreshHold to 1 - an event will be raised everytime a character arrives on the port.
You can also use this to detect the 'RING' data arriving on the port and then handling the Ring.

I've had to do this on NT as NT has a problem raising the comEvRing event.

Once the modem answers the call you can change the RTThreshHold to a value that better suits you or even to 0 to prevent the raising of events.

HTH,
Alon
0
 

Author Comment

by:azsoft
ID: 7153321
Where can i get the ATA.
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 8002263
Hi azsoft,
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will ask a Community Support Moderator to:

    Accept vinnyd79's comment(s) as an answer.

azsoft, if you think your question was not answered at all or if you need help, just post a new comment here; Community Support will help you.  DO NOT accept this comment as an answer.

EXPERTS: If you disagree with that recommendation, please post an explanatory comment.
==========
DanRollins -- EE database cleanup volunteer
0
 

Expert Comment

by:SpideyMod
ID: 8095162
per recommendation

SpideyMod
Community Support Moderator @Experts Exchange
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…

760 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now