For Programmers: Free Programming Magazines  


Home > Archive > Smartphone Developer Forum > June 2006 > Looking up contact numers in WM5









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Looking up contact numers in WM5
plank@plank.com

2006-06-24, 8:26 am

Hey,

I am new to mobile development and am just starting simple for now.. am trying to send an SMS to a contacts number.

I can get the contact list up but once I select a contact how do I then choose a number?

Any help would be appreciated!

Thanks in advance,

Plank

Brian Cross [MS]

2006-06-24, 8:26 am

Are you programming in native C++ or in a managed language (C#/VB)?
How are you bringing up the contact list?

The "ChooseContactDialog" class (C#/VB) brings up a dialog that allows the
user to pick a contact. You can then get the entire contact object or just
a specific property from the contact from the instance.

If you are using native C++, then you can use the "ChooseContact" function
which will provide the same interface.

--
Brian Cross
Software Design Engineer
Windows Mobile Core and WiMobot Enthusiast

This posting is provided "AS IS" with no warranties, and confers no rights.


<plank@plank.com> wrote in message
news:tuco92pt9bhrsjr4c15s0hrsotne4r93pb@
4ax.com...
> Hey,
>
> I am new to mobile development and am just starting simple for now.. am
> trying to send an SMS to a contacts number.
>
> I can get the contact list up but once I select a contact how do I then
> choose a number?
>
> Any help would be appreciated!
>
> Thanks in advance,
>
> Plank
>



plank@plank.com

2006-06-24, 8:26 am

Hi Brian,

Thanks for your quick reply and sorry for the lack of information!

I am using C# and ChooseContactDialog class to pick the contact, once I have the contact object is there a simple way of
showing all of their numbers for the user to select one to send the SMS to? Or is this something I will have to do myself?

Thanks again!

Plank


On Fri, 23 Jun 2006 12:20:13 -0700, "Brian Cross [MS]" <bcross@online.microsoft.com> wrote:

>Are you programming in native C++ or in a managed language (C#/VB)?
>How are you bringing up the contact list?
>
>The "ChooseContactDialog" class (C#/VB) brings up a dialog that allows the
>user to pick a contact. You can then get the entire contact object or just
>a specific property from the contact from the instance.
>
>If you are using native C++, then you can use the "ChooseContact" function
>which will provide the same interface.


--
Brian Cross
Software Design Engineer
Windows Mobile Core and WiMobot Enthusiast

This posting is provided "AS IS" with no warranties, and confers no rights.


<plank@plank.com> wrote in message
news:tuco92pt9bhrsjr4c15s0hrsotne4r93pb@
4ax.com...
> Hey,
>
> I am new to mobile development and am just starting simple for now.. am
> trying to send an SMS to a contacts number.
>
> I can get the contact list up but once I select a contact how do I then
> choose a number?
>
> Any help would be appreciated!
>
> Thanks in advance,
>
> Plank
>



Brian Cross [MS]

2006-06-26, 7:08 pm

The ChooseContactDialog has the ability to show a list of Contacts and then
when the user selects one, it will then show the list of contact properties
to choose.

The following code will show a list of contacts and then allow the user to
pick a phone number of the contact that was chosen:


ChooseContactDialog dlg = new ChooseContactDialog();
dlg.ChooseContactOnly = false;
dlg.RequiredProperties = new ContactProperty[] {
ContactProperty.AllPhone};
dlg.ShowDialog();

Setting ChooseContactOnly to false says that you want to allow the user to
select the contact AND the property. RequiredProperties filters the
contacts that are shown to only contacts that have valid properties listed
in the ContactProperty array.

You can use "ContactProperty.Sms" instead of "ContactProperty.AllPhone" if
you want and just get the known SMS number (which there will probably only
be one and thus the 2nd dialog will not be shown).

Hope that helps!

--
Brian Cross
Software Design Engineer
Windows Mobile Core and WiMobot Enthusiast

This posting is provided "AS IS" with no warranties, and confers no rights.


<plank@plank.com> wrote in message
news:966q92lfvohmgk0a7bseea2vr0t85uvfqt@
4ax.com...
> Hi Brian,
>
> Thanks for your quick reply and sorry for the lack of information!
>
> I am using C# and ChooseContactDialog class to pick the contact, once I
> have the contact object is there a simple way of
> showing all of their numbers for the user to select one to send the SMS
> to? Or is this something I will have to do myself?
>
> Thanks again!
>
> Plank
>
>
> On Fri, 23 Jun 2006 12:20:13 -0700, "Brian Cross [MS]"
> <bcross@online.microsoft.com> wrote:
>
>
> --
> Brian Cross
> Software Design Engineer
> Windows Mobile Core and WiMobot Enthusiast
>
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
>
>
> <plank@plank.com> wrote in message
> news:tuco92pt9bhrsjr4c15s0hrsotne4r93pb@
4ax.com...
>
>



Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2009 codecomments.com