Posted By

qrist0ph on 08/13/08


Tagged

mobile studentWest


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

umang_nine


Windows Mobile Tutorial


 / Published in: C#
 

  1. using System;
  2. using System.Linq;
  3. using System.Collections.Generic;
  4. using System.ComponentModel;
  5. using System.Data;
  6. using System.Drawing;
  7. using System.Text;
  8. using System.Windows.Forms;
  9. using Microsoft.WindowsMobile.PocketOutlook;
  10. using Microsoft.WindowsMobile.Telephony;
  11.  
  12. namespace SmartDeviceProject1
  13. {
  14. public partial class Form1 : Form
  15. {
  16. Random rnd = new Random(DateTime.Now.Millisecond);
  17. OutlookSession os = new OutlookSession();
  18. ContactCollection kontakte;
  19.  
  20. public Form1()
  21. {
  22. InitializeComponent();
  23. kontakte = os.Contacts.Items;
  24. Contact meinKontakt = new Contact();
  25. meinKontakt.FirstName = "dieter";
  26. meinKontakt.LastName = "wurst";
  27. meinKontakt.MobileTelephoneNumber = "018930334";
  28. kontakte.Add(meinKontakt);
  29. }
  30.  
  31.  
  32. private void color_Click(object sender, EventArgs e)
  33. {
  34. this.BackColor = Color.FromArgb(rnd.Next(255), rnd.Next(255), rnd.Next(255));
  35. }
  36.  
  37. private void menuExit_Click(object sender, EventArgs e)
  38. {
  39. Close();
  40. }
  41.  
  42. private void btnCall_Click(object sender, EventArgs e)
  43. {
  44. Phone meinHandy = new Phone();
  45. meinHandy.Talk("04543534");
  46. }
  47.  
  48. private void btnSMS_Click(object sender, EventArgs e)
  49. {
  50. SmsMessage mySms = new SmsMessage();
  51. mySms.Body = "das is ne nachtichr";
  52. mySms.To.Add(new Recipient("32423423"));
  53. mySms.Send();
  54. MessageBox.Show("versendet");
  55. }
  56. }
  57. }

Report this snippet  

You need to login to post a comment.