Reference:
http://www.cnblogs.com/allenlooplee/archive/2009/01/14/1375941.html

添加引用:

using Microsoft.WindowsMobile;
using Microsoft.WindowsMobile.PocketOutlook;
using Microsoft.WindowsMobile.PocketOutlook.MessageInterception;

发短信:

SmsMessage msg = new SmsMessage(phoneNumber, message);
msg.Send();

接收短信过滤功能:
(接收到包含"What're you doning"的短信后自动发送预先设置好的状态信息)

private MessageInterceptor m_MsgInterceptor = new MessageInterceptor(InterceptionAction.Notify); 

m_MsgInterceptor.MessageCondition 
= new MessageCondition(
                  MessageProperty.Body,
                  MessagePropertyComparisonType.Contains,
                  
"What're you doing",
                  
false);

m_MsgInterceptor.MessageReceived 
+= new MessageInterceptorEventHandler(m_MsgInterceptor_MessageReceived); 

private void m_MsgInterceptor_MessageReceived(object sender, MessageInterceptorEventArgs e)
{
      SendSms(e.Message.From.Address, statusCombox.Text);
}

 

 



相关文章:

  • 2022-01-23
  • 2021-05-12
  • 2021-12-04
  • 2021-11-27
  • 2022-01-22
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-21
  • 2021-09-26
相关资源
相似解决方案