Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Callerid
Index -> Programming, Visual Basic and Other Basics -> Visual Basic Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
alpesh




PostPosted: Tue Apr 26, 2005 6:19 am   Post subject: Callerid

i have given below code for caller id
-----------------------
Place a MsComm Ctrl on the form names MSComm a textbox named txtIncomming
and a Command Button named cmdListen place the following code into the form
and try it out.


Code:
Option Explicit

Private Sub cmdListen_Click()
'Open Port to Listen
If Not MSComm.PortOpen Then
MSComm.PortOpen = True
End If

'Test to see if it is Open if it is not the display message
If Not MSComm.PortOpen Then
MsgBox "Cannot open comm port " & MSComm.CommPort
Exit Sub
End If

'Init Settings
MSComm.RThreshold = 1
MSComm.InputLen = 1

'Send the correct Modem Command to watch Caller ID Info
MSComm.Output = "AT+VCID=1" & vbCr
End Sub

Private Sub Form_Load()
MSComm.CommPort = CLng(InputBox("What CommPort is your modem?", "CommPort", 3))
End Sub

Private Sub Form_Unload(Cancel As Integer)
If MSComm.PortOpen Then
MSComm.PortOpen = False
End If
End Sub

Private Sub MSComm_OnComm()
Dim sIncomming
Select Case MSComm.CommEvent
Case comEvReceive
Do
sIncomming = MSComm.Input
txtIncomming.Text = txtIncomming.Text & sIncomming
Loop While MSComm.InBufferCount
End Select
End Sub

=========
Embarassed Embarassed
can any body help how to check this code is write .../
or any body have good idea to make pro. callerid ? ...
plz reply .....
Sponsor
Sponsor
Sponsor
sponsor
betaflye




PostPosted: Thu Apr 28, 2005 7:27 pm   Post subject: (No subject)

This sounds like a homework question, just make the controls as specified and copy the code into the code editor.
Display posts from previous:   
   Index -> Programming, Visual Basic and Other Basics -> Visual Basic Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 2 Posts ]
Jump to:   


Style:  
Search: