Usuário com melhor resposta
Interceptar chamadas

Pergunta
-
Respostas
-
Galera,
Depois de horas fazendo testes achei a solução... Acredito que seja útil para alguns de vcs...
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Claro que o trecho de código ainda não faz praticamente nada e precisa de melhorias, mas a idéia é essa:
Dim state As New SystemState(SystemProperty.PhoneIncomingCall)
AddHandler state.Changed, AddressOf teste
End Sub Private Sub teste(ByVal sender As Object, ByVal e As ChangeEventArgs)
Dim s As SystemState = CType(sender, SystemState)
If s.Property = SystemProperty.PhoneIncomingCall Then
MessageBox.Show(SystemState.PhoneIncomingCallerNumber)
End If
End SubEspero ter ajudado a mais alguém.
Abraços
Todas as Respostas
-
Galera,
Depois de horas fazendo testes achei a solução... Acredito que seja útil para alguns de vcs...
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Claro que o trecho de código ainda não faz praticamente nada e precisa de melhorias, mas a idéia é essa:
Dim state As New SystemState(SystemProperty.PhoneIncomingCall)
AddHandler state.Changed, AddressOf teste
End Sub Private Sub teste(ByVal sender As Object, ByVal e As ChangeEventArgs)
Dim s As SystemState = CType(sender, SystemState)
If s.Property = SystemProperty.PhoneIncomingCall Then
MessageBox.Show(SystemState.PhoneIncomingCallerNumber)
End If
End SubEspero ter ajudado a mais alguém.
Abraços
-
-
Tem um exemplo interessante neste blog http://msmvps.com/blogs/williamryan/archive/2007/01/25/sms-messages-with-windows-mobile-5-0.aspx
-