I received a special task today. I got a call number from Windows Mobile. In fact, it has a call display, but now I want to write it myself.ProgramTo display the incoming call...
No way... although I have never done it... it seems that this stuff is important... so I am still confused. I am going to find information online... Yes !~~~
The method is as follows:
Automatic incoming call
The local method of keybd_event is used to stop the call.
Public Static Class Dropcall
{
# Region Private Field
// VK key F4 of the end key
Private Const Int Vk_f4 = 0x73 ;
Private Const Int Keyeventf_keyup = Zero X 0002 ;
# Endregion
# Region Public Field
// Banned phone number list
Public Static List < String > Bannedlist = New List < String > ();
/**/ /// <Summary>
/// Simulate a key operation
/// </Summary>
Public Static Void Drop ()
{
Myref. keybd_event (vk_f4, 0 , 0 , 0 );
Myref. keybd_event (vk_f4, 0 , Keyeventf_keyup, 0 );
}
# Endregion
}
The systemstate class and systemproperty class are used to obtain the incoming call number.
# Region Attach event Delegate
Systemstate state = New Systemstate (systemproperty. phoneincomingcallernumber );
Systemstate SS = New Systemstate (systemproperty. phoneincomingcall );
SS. Changed + = New Changeeventhandler (ss_changed );
State. Changed + = New Changeeventhandler (state_changed );
# Endregion
We use the cellular simulator to simulate incoming calls.
The program running effect is as follows:
In addition, you can set up a series of phone numbers that you don't want to answer, so that the program will hang them up for you.
For example:
# Region Initialize the blocked number list
Dropcall. bannedlist. Add ( " 1 (312) 132-132 " );
# Endregion
When you dial the number 13112132132 in cellular emulator, the simulator will help you stop it.
Download the complete program: dropcalldemo.rar
Required environment:Windows Mobile 6 Professional SDK. NET Compact Framework 3.5
Windows Mobile 6 Professional SDK:
Http://www.microsoft.com/downloads/details.aspx? Familyid = 06111a3a-a651-4745-88ef-3d48091a390b & displaylang = en
You may need to refer to the following materials:
Use of cellular emulator:Http://www.cnblogs.com/sukiwqy/archive/2009/12/06/1618192.html
Table of common Windows Mobile key values (VK:Http://www.cnblogs.com/sukiwqy/archive/2009/12/06/1618204.html