Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Any idea how to drop an incoming call?

2 views
Skip to first unread message

diesel power

unread,
Feb 8, 2008, 3:19:01 AM2/8/08
to
Hi there!
Does anyone have an idea how to automatically drop an incoming call?

Imports Microsoft.WindowsMobile.Status

Public Class Form1
Dim WithEvents FromHowIGetPhoneCalls As New
SystemState(SystemProperty.PhoneIncomingCallerNumber)

Private Sub MenuItem1_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles MenuItem1.Click
Me.Close()
End Sub

Private Sub FromHowIGetPhoneCalls_Changed(ByVal sender As Object,
ByVal args As Microsoft.WindowsMobile.Status.ChangeEventArgs) Handles
FromHowIGetPhoneCalls.Changed
If Not args.NewValue Is Nothing Then
If (args.NewValue.ToString.Equals("0XXXXXXX")) Then
'here must be the drop call
End If
End If
End Sub

End Class

Peter Foot

unread,
Feb 8, 2008, 5:03:37 AM2/8/08
to
You should be able to simulate a keypress of the End key (equivalent to F4).
e.g.

//P/Invoke required
[DllImport("coredll.dll")]
internal static extern void keybd_event(byte bVk, byte bScan, int dwFlags,
int dwExtraInfo);

internal const int VK_F4 = 0x73;
internal const int KEYEVENTF_KEYUP = 0x0002;


//simulate press and release using:-

keybd_event(VK_F4, 0, 0, 0);
keybd_event(VK_F4, 0, KEYEVENTF_KEYUP, 0);

It shouldn't be too difficult to convert the snippets to VB.NET as required.

Peter

--
Peter Foot
Microsoft Device Application Development MVP
www.peterfoot.net | www.inthehand.com
In The Hand Ltd - .NET Solutions for Mobility

"diesel power" <ift...@gmail.com> wrote in message
news:ab4420ff-c0f8-4cd6...@v4g2000hsf.googlegroups.com...

diesel power

unread,
Feb 8, 2008, 10:47:37 AM2/8/08
to
On Feb 8, 12:03 pm, "Peter Foot" <feedb...@nospam-inthehand.com>
wrote:

> You should be able to simulate a keypress of the End key (equivalent to F4).
> e.g.
>
> //P/Invoke required
> [DllImport("coredll.dll")]
> internal static extern void keybd_event(byte bVk, byte bScan, int dwFlags,
> int dwExtraInfo);
>
> internal const int VK_F4 = 0x73;
> internal const int KEYEVENTF_KEYUP = 0x0002;
>
> //simulate press and release using:-
>
> keybd_event(VK_F4, 0, 0, 0);
> keybd_event(VK_F4, 0, KEYEVENTF_KEYUP, 0);
>
> It shouldn't be too difficult to convert the snippets to VB.NET as required.
>
> Peter
>
> --
> Peter Foot
> Microsoft Device Application Development MVPwww.peterfoot.net|www.inthehand.com

> In The Hand Ltd - .NET Solutions for Mobility
>
> "diesel power" <ift...@gmail.com> wrote in message
>
> news:ab4420ff-c0f8-4cd6...@v4g2000hsf.googlegroups.com...
>
> > Hi there!
> > Does anyone have an idea how to automatically drop an incoming call?
>
> > Imports Microsoft.WindowsMobile.Status
>
> > Public Class Form1
> > Dim WithEvents FromHowIGetPhoneCalls As New
> > SystemState(SystemProperty.PhoneIncomingCallerNumber)
>
> > Private Sub MenuItem1_Click(ByVal sender As System.Object, ByVal e
> > As System.EventArgs) Handles MenuItem1.Click
> > Me.Close()
> > End Sub
>
> > Private Sub FromHowIGetPhoneCalls_Changed(ByVal sender As Object,
> > ByVal args As Microsoft.WindowsMobile.Status.ChangeEventArgs) Handles
> > FromHowIGetPhoneCalls.Changed
> > If Not args.NewValue Is Nothing Then
> > If (args.NewValue.ToString.Equals("0XXXXXXX")) Then
> > 'here must be the drop call
> > End If
> > End If
> > End Sub
>
> > End Class

thx it works

0 new messages