VK_F4 Event

  • Thread starter Thread starter Fatih Iþýkhan
  • Start date Start date
Hi,

How is it possible to catch incoming call end key event WM5?

Hi~

try to use the following code:

public class DropCall
{
#region private field
private const int VK_F4 = 0x73;
private const int KEYEVENTF_KEYUP = 0x0002;
#endregion

#region public fiield

/// <summary>
/// simulate the keyboard event
/// </summary>
public static void Drop()
{
MyRef.keybd_event(VK_F4, 0, 0, 0);
MyRef.keybd_event(VK_F4, 0, KEYEVENTF_KEYUP, 0);
}
#endregion
}

#region Invoke Class
public static class MyRef
{
//invoke keybd_event API
[DllImport("coredll.dll")]
public static extern void keybd_event(
byte bVk,
byte bScan,
int dwFlags,
int dwExtraInfo);
}
#endregion


to detect the incoming call and the callNumber, please refer to
SystemProperty.PhoneIncomingCallerNumber and
SystemProperty.PhoneIncomingCall

hope this helps

:)
 
How is it possible to catch incoming call end key event WM5?

Hi~

try to use the following code:

   public class DropCall
    {
        #region private field
        private const int VK_F4 = 0x73;
        private const int KEYEVENTF_KEYUP = 0x0002;
        #endregion

        #region public fiield

        /// <summary>
        /// simulate the keyboard event
        /// </summary>
        public static void Drop()
        {
            MyRef.keybd_event(VK_F4, 0, 0, 0);
            MyRef.keybd_event(VK_F4, 0, KEYEVENTF_KEYUP, 0);
        }
        #endregion
    }

    #region Invoke Class
    public static class MyRef
    {
        //invoke keybd_event API
        [DllImport("coredll.dll")]
        public static extern void keybd_event(
            byte bVk,
            byte bScan,
            int dwFlags,
        int dwExtraInfo);
    }
    #endregion

to detect the incoming call and the callNumber, please refer to
SystemProperty.PhoneIncomingCallerNumber and
SystemProperty.PhoneIncomingCall

hope this helps

:)

Oops,may be i got a little bit misunderstanding..

to Detect the end key event, you have to subscribe the KeyDown event
in the very beginning of your code .

i must take the word "end"(in your question) to "and" in my last
post. :-)
 
try to use the following code:
   public class DropCall
    {
        #region private field
        private const int VK_F4 = 0x73;
        private const int KEYEVENTF_KEYUP = 0x0002;
        #endregion
        #region public fiield
        /// <summary>
        /// simulate the keyboard event
        /// </summary>
        public static void Drop()
        {
            MyRef.keybd_event(VK_F4, 0, 0, 0);
            MyRef.keybd_event(VK_F4, 0, KEYEVENTF_KEYUP, 0);
        }
        #endregion
    }
    #region Invoke Class
    public static class MyRef
    {
        //invoke keybd_event API
        [DllImport("coredll.dll")]
        public static extern void keybd_event(
            byte bVk,
            byte bScan,
            int dwFlags,
        int dwExtraInfo);
    }
    #endregion
to detect the incoming call and the callNumber, please refer to
SystemProperty.PhoneIncomingCallerNumber and
SystemProperty.PhoneIncomingCall
hope this helps

Oops,may be i got a little bit misunderstanding..

to Detect the end key event, you have to subscribe the KeyDown event
in the very beginning of your code .

i must take the word "end"(in your question) to "and" in my last
post.  :-)- Hide quoted text -

- Show quoted text -

Thanks, but how to subscribe to KeyDown event?
 
Back
Top