Simon S
Simon S

Reputation: 227

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

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

All I want it to present a button to the user which, when clicked, calls a predefined number (after asking the user if it is ok to call).

Any ideas?

Upvotes: 3

Views: 857

Answers (1)

Simon S
Simon S

Reputation: 227

Sorted it.

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 sort this and it was so straightforward!

Upvotes: 4

Related Questions