开发者

c# windows mobile Text messaging

开发者 https://www.devze.com 2022-12-08 15:53 出处:网络
I have mad an application for windows mobile which can do different mobile functions with the numbers the application has.

I have mad an application for windows mobile which can do different mobile functions with the numbers the application has.

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()开发者_如何学Go;

            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. 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. 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.

0

精彩评论

暂无评论...
验证码 换一张
取 消