Hi,
I'm trying to make a program in VB using SmartPhone functions.
For instance, I succed to dial a call with PhoneMakeCall function :
http://msdn.microsoft.com/library/default.asp url=/library/en-us/APISP/html/sp_phone_phonemakecall.asp
I'd like to know if it's possible to take an incomming call, I can't find anything about that on MSDN..
Does someone could say me if it's posible, and how do that.
thanks

Take an incomming call on a smartphone
SQLMonger66
Here is the good one :
<DllImport("coredll.dll", CharSet:=CharSet.Unicode)> _
Public Shared Sub keybd_event(ByVal bVk As Byte, ByVal bScan As Byte, ByVal dwFlags As Integer, ByVal dwExtraInfo As Integer) End SubNathanLiu
Const KEYEVENTF_KEYUP = &H2
Const KEYEVENTF_KEYDOWN = &H0
#Region " Pickup a call "
Public Shared Sub Decrocher() 'appui sur la touche appel
keybd_event(114, 0, KEYEVENTF_KEYDOWN, 0) 'relache la touche appel
keybd_event(114, 0, KEYEVENTF_KEYUP, 0)
End Sub
#End Region
#Region " Hang up a call"
Public Shared Sub Racrocher()
'appui sur la touche raccrocher
keybd_event(115, 0, KEYEVENTF_KEYDOWN, 0)
'relache la touche raccrocher
keybd_event(115, 0, KEYEVENTF_KEYUP, 0)
End Sub
Hooray_for_Boobies
I'd like try your solution, but I don't know whitch value to give to "VK_TTALK" constant.
So I've try to use this method to shut the smartphone for example, here is my code :
------------------------------------------------------------
Declare Sub keybd_event Lib "coredll" (ByVal bVk As Byte, ByVal bScan As Byte, ByVal dwFlag As Long, ByVal dwExtraInfo As Long)
Const VK_OFF = &HDF
Call keybd_event(VK_OFF, 0, 0, 0)
-------------------------------------------------------------
and the program stop because of a "System.NotSupportedException", I think, it would be the same thing with VK_TTALK constant...
Could you please explain me witch value to give to VK_TTALK, and why there is this exception.
Thanks in advance.
regards
Arthg2000
phita
thanks for your answer.
regards
Erik Arfeuille
blade00007
Alternatively, if you know the phone is ringing, you could fake a press of the talk button via keybd_event(VK_TTALK).
- Larry Lieberman [Microsoft]
Mobile Developer Experience Team
mrfantasy999
Here is my code :
Declare Sub keybd_event Lib "user32" Alias "keybd_event" (ByVal bVk As Byte, ByVal bScan As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo As Long) Public Shared Sub Decrocher()
keybd_event(114, 0, 0, 0)
keybd_event(114, 0, 2, 0)
End Sub
Thanks in advance
Ratzu