How to place a call in VB.Net for a Windows 7 phone?

I am new to WP7 programming. I am trying to initiate a call to a specific number from a single button in my application. I found an example code on MSDN, but I can’t get it to work correctly, and I think this is for the .net compact framework, not WP7.

All I want is for it to provide the user with a button that, when clicked, calls a predefined number (after asking the user whether it is ok to call).

Any ideas?

+3
source share
1 answer

Sorted.

Remarkably simple, as it turns out - see below:

Dim callme As New Microsoft.Phone.Tasks.PhoneCallTask

callme.PhoneNumber = "numbertocall"
callme.Show()

Spent hours trying to figure it out, and it was so easy!

+4
source

All Articles