opening Contacts Dialogue

  • Thread starter Thread starter farseer
  • Start date Start date
F

farseer

How can i programatically open the Contact detail Dialogue that shows
the details about a given contact (i.e. the various phone numbers,
address, emails etc. )

I have found that i can send a message to the Phone dialogue to do this
IF that dialogue was previously opened. However, after a sof-reset of
the device, it does not work until i manually open the dialogue the
first time.
 
You can do this via the POOM api. See the Pocket PC SDK for details - you'll
need to create an application instance, and then get the specific contact
item you need - either from it's Oid identifier, or via a Find/Restrict
query on the contacts collection. Then you can call the Display method for
the item.
To do this from .NETCF you either need to have a Windows Mobile 5.0 device -
in which case you can use the Microsoft.WindowsMobile.PocketOutlook
namespace. Or you will need a .NETCF wrapper around POOM for older devices.

Peter
 
using CF2.0 and WM5.0, i can look up the the OID or get the Contact
object by using the Restrict method of the Contact Collection. But, at
that point i don't know how to open that 'Contact detail form". There
is a ChooseContacts dialogue, but it is not what i am referring to.
The ChooseContacts dialogue lists the entire or restricted list of
contacts. Further, i do not see a "Display" method of the Contacts
object using CF2.0 and WM5.0.
 
darn, just as i posted, i see a ShowDialogue method, which is probably
the method i want. the method above, where we use find or restrict to
get at the particular contact, then call show dialogue can be slow for
a user with a huge list of contacts.
However, when you select menu->view contacts from the Phone screen, it
opens the last caller info very quickly. I am wondering if on the
Phone screen somewhere, is hidden somewhere the OID for quick access to
the last caller info? using spy, i could see anything obvious, other
the caller name and phone number (which are the parameters i am using
to look up the contact ).
 
Bear in mind that because your code is managed it has to JIT your code, and
that of the methods in Microsoft.WindowsMobile.PocketOutlook - the phone
application is all native code. I'd expect your method to work noticably
quicker on second and subsequent attempts, even so Restrict/Find can be
slow. I don't think the system caches the Oid - certainly it is not stored
with the call history.

Peter
 
Back
Top