Thread: speakerphone
View Single Post
  #2 (permalink)  
Old 04-10-2008, 04:04 PM
Erel's Avatar
Erel Erel is offline
Administrator
 
Join Date: Apr 2007
Posts: 3,204
Default

Sending the keycode 127 toggles the speakerphone (while speaking). Credits go to Peter Foot's blog: http://peterfoot.net/Programmaticall...akerphone.aspx

If you want to answer a call and automatically activate the speaker you should download this example: Answering and dropping a call from code
And change two of the subs:
Code:
Sub phone_IncomingCall
    timer1.Enabled = true 'Wait two seconds before pressing the Talk button.
End Sub

Sub Timer1_Tick
    If duringCall Then
        timer1.Enabled = false
        hw.KeyPress(127) 'Toggle the speaker.
    Else
        hw.KeyPress(114) 'Simulate the green Talk button.
        duringCall = true
    End If
End Sub
Otherwise you could just use Hardware.KeyPress(127) with a hardware object.
Reply With Quote