I'm new to Windows Mobile Development. Here's my question: How to create a program / function to add / change the picture image of a contact in the Windows Mobile 6.5 environment?
Can you give some suggestions on which class to use and how to use it?
Thanks a million
This is your example code:
< Pre> using the system; Using System.IO; Using System.Data; Using System.Text; Using System.Drawing; Using System.Windows.Forms; Using System.ComponentModel; Using System.Collections.Generic; Using Microsoft.WindowsMobile.Forms; Using Microsoft Windows Mobile. PocketAutclock; Namespace Microsoft. WindowsMobile.Contact.Administrator Contact {Public Partial Forms Form 1: Form {Public Form 1 () {Initialize Companent (); } Private Zero mnuChooseContact_Click (Object Sender, EventArgs E) {SelectContactDialog select contact dialog = NewChooseContactDialog (); Choose PictureDialog Choose PictureDialog = New Selection PictureDialog (); Contact Contact = New Contact (); This.mnuChooseContact.Enabled = false; // Open a PocketOutClock session (OutlookSession session = new OutlookSession ()) {// Contact one if (session.Contacts.Items.Count & lt; = 0) {contact.FirstName = "contact"; Contact.LastName = "with picture"; Session.Contacts.Items.Add (contact); } Other {contact = session.Contacts.Items [0]; } // Choose oneCactctom_OG and select oneGrand Dialogue. If a contact was selected and a picture was selected, // specify the picture for the contact if ((DialogResult.OK == Select Dialog.ShowDialog ()) & amp; amp; (DialogResult.OK == Select Image Dialog.ShowDialog ())) {contact.SetPicture (SelectPictureDialog.FileName); Contact.Update (); Contact.ShowDialog (); }} This.mnuChooseContact.Enabled = true; } Private Zero Menu itemExtigl (object sender, event events e) {this.Close (); }}}
Comments
Post a Comment