views:

182

answers:

2

Hi! 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();

            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

+1  A: 

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.

JeffH
A: 

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.

Christopher Fairbairn