简体   繁体   English

C#Windows Mobile短信

[英]c# windows mobile Text messaging

I have mad an application for windows mobile which can do different mobile functions with the numbers the application has. 我为Windows Mobile疯狂了一个应用程序,它可以使用该应用程序具有的编号来执行不同的移动功能。

Anyway. 无论如何。 I want to start the Text message application and send a phonenumber as an argument. 我想启动短信应用程序并发送电话号码作为参数。 I have only found this: 我只发现了这一点:

             SmsMessage sms = new SmsMessage();

            sms.Body = "This is a message";
            sms.To.Add(new Recipient(sNumber));
            sms.Send();

But i want to use the text messaging application in the mobile device. 但是我想在移动设备中使用短信应用程序。 Any tip? 有小费吗?

thanks in advance 提前致谢

As a start, have you looked to see if this discussion is relevant to what you want to do? 首先,您是否希望查看此讨论是否与您想做的事情有关? One thing it mentions is using CE MAPI and COM interop. 它提到的一件事是使用CE MAPI和COM互操作。 There's also the Mobile In The Hand library. 还有“手提电脑”图书馆。

There are other links in that discussion too. 该讨论中还有其他链接。

Take a look at the MessagingApplication class, in particular its DisplayComposeForm static method . 看一下MessagingApplication类,尤其是其DisplayComposeForm静态方法 You should be able to use a code snippet such as the following to get the built in messaging application to appear. 您应该能够使用如下代码片段来使内置消息传递应用程序出现。

  SmsMessage sms = new SmsMessage();

  sms.Body = "This is a message";
  sms.To.Add(new Recipient(sNumber));
  MessagingApplication.DisplayComposeForm(sms);

I also have a blog post available with a sample application that in part demonstrates using this API - http://www.christec.co.nz/blog/archives/495 . 我也有一个博客文章,其中包含一个示例应用程序,部分演示了如何使用此API- http://www.christec.co.nz/blog/archives/495

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM