Results 1 to 3 of 3

Thread: interface telecom with vb

  1. #1

    Thread Starter
    New Member
    Join Date
    Aug 2000
    Location
    india
    Posts
    1

    Thumbs up

    dear

    i want to integrate a telephone equipment with vb form
    i.e as soon as someone rings the phone a form should pop on window

    could you do that

    junoon


  2. #2
    Fanatic Member gwdash's Avatar
    Join Date
    Aug 2000
    Location
    Minnesota
    Posts
    666
    if you understand the MSComm Control, you could use the OnComm event with the the Ring event. Then you could do that! check MSDN
    GWDASH
    [b]VB6, Perl, ASP, HTML, JavaScript, VBScript, SQL, C, C++, Linux , Java, PHP, MySQL, XML[b]

  3. #3
    Member
    Join Date
    Aug 2000
    Posts
    60

    Cool

    OK, i will expand a bit on gwDash's comments.

    Create a new exe, add the MSCOMM control. On the form, create a label (label1), a ListBox (List1) and last but not least the MSCOMM control (MSCOMM1), then paste the code below into the form code (overwrite any code that already exists in there),


    <---Start Of Code--->

    Private Sub Form_Load()
    MSComm1.CommPort = 1 'Set the comm port of the modem
    MSComm1.Settings = "9600,N,8,1" 'Set some modem settings (These will do for this project)

    MSComm1.PortOpen = True
    End Sub

    Private Sub MSComm1_OnComm()

    'Check if the event was a ring
    If MSComm1.CommEvent = 6 Then

    'If it was add 1 to the number of rings recieved by the program (to a label that the user can see)
    Label1.Tag = Label1.Tag + 1
    Label1.Caption = "Total Number Of Rings: " & Label1.Tag

    'Record the time at which the ring was detected
    Tim$ = Time$

    'Ask the user who called
    caller = InputBox("Who called?", "Who Called?", "Company")

    'Add the event to a list with the time at which the phone rang
    List1.AddItem caller & " rang at " & Tim$

    End If
    End Sub


    <---End of code--->


    Hope this has helped

    Grant French

    E-Mail: [email protected]
    ICQ: 33122184

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