Download the free trial version
Basic4android Video
Features
Tutorials and manuals
Showcase
Screenshots

Go Back   Android Development Forum - Basic4android > Basic4ppc (Windows Mobile) > Code Samples & Tips > Additional Libraries
Documentation Wiki Register Members List B4P Search Today's Posts Mark Forums Read

Additional Libraries Users contributed libraries.
This sub-forum is only available to licensed users.

Contact and Property Chooser libray

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 02-11-2009, 02:02 PM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 6,072
Awards Showcase
Innovator medal Beta Tester Forum Contributer 
Total Awards: 3
Default Contact and Property Chooser libray

This library is an extended version of a simpler one that that I produced in response to a query in another thread. Used in conjunction with the Outlook library it lets a user either choose a contact from a contact list, or choose a specific property of a pre-selected contact. There are facilities to restrict the list of contacts available to the user to a selected sub-set of the full list.

The library requires .NET 2.0 and WM5.0 or later on the device. A dummy library to ease development on the desktop is also provided. That requires .NET 2.0 also. A help file is included but there is no demo as the use of the library really depends upon the contents of your Outlook contacts list.

EDIT:- Version 1.1 posted. See post #7 for details.
Attached Files
File Type: zip ChooseContactDialog1.1.zip (12.9 KB, 113 views)

Last edited by agraham : 10-16-2009 at 10:58 AM.
Reply With Quote
  #2 (permalink)  
Old 04-12-2009, 12:55 PM
Knows the basics
 
Join Date: Aug 2008
Location: Russia, Perm
Posts: 70
Send a message via ICQ to Aspire89
Default

how to use the library, add the number of the selected contact in the textbox, if possible, with an example please, thanks
Reply With Quote
  #3 (permalink)  
Old 04-12-2009, 01:19 PM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 6,072
Awards Showcase
Innovator medal Beta Tester Forum Contributer 
Total Awards: 3
Default

If ChooseProperty is false (the default) then the dialog returns a contact chosen by the user that you assign to a Contact object from the Outlook library and take it from there.

Code:
  ...
  OutlookContact.New1 
' only need to do it once
  ...

If ChooseContact.Show = cOK Then ' dialog OK
  ' assign the selected contact reference to an Outlook library Contact object
 OutlookContact.Value = ChooseDialog.SelectedContact
 
' now all the properties should be available
  tbxFirstName.Text = OutlookContact.FirstName
  tbxLastName.Text = OutlookContact.LastName
  ....
End If
Reply With Quote
  #4 (permalink)  
Old 10-16-2009, 09:00 AM
klaus's Avatar
Basic4ppc Expert
 
Join Date: Oct 2007
Location: Fully, Switzerland
Posts: 4,459
Awards Showcase
Forum Contributer Beta Tester Competition Winner 
Total Awards: 3
Default

Hi Andrew,

I am trying to use the ChooseContactDialog library.
But I get an error message that the name Windows Mobile doesn't exist.
What am I missing ?

Attached the error message and the test program.

Thank's in advance and best regards.
Attached Images
File Type: jpg ChooseContactDialog_Fehler_2.jpg (18.3 KB, 12 views)
Attached Files
File Type: sbp ChooseContactDialog.sbp (584 Bytes, 21 views)
__________________
Klaus
Switzerland

Beginner's Guide / User's Guide
Reply With Quote
  #5 (permalink)  
Old 10-16-2009, 09:14 AM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 6,072
Awards Showcase
Innovator medal Beta Tester Forum Contributer 
Total Awards: 3
Default

You don't have the Windows Mobile assemblies Microsoft.WindowsMobile.Forms.dll or Microsoft.WindowsMobile.PocketOutlook.dll on your desktop as they are not part of the Compact Framework 2. Remove ChooseContactDialog.cs from your Libraries folder and use the ChooseContactDialog.dll on the device.
__________________
Sorry, but I don't answer questions by PM or email.
Please post your queries in the forum.
Reply With Quote
  #6 (permalink)  
Old 10-16-2009, 09:59 AM
klaus's Avatar
Basic4ppc Expert
 
Join Date: Oct 2007
Location: Fully, Switzerland
Posts: 4,459
Awards Showcase
Forum Contributer Beta Tester Competition Winner 
Total Awards: 3
Default

Hi Andrew,

Thank's, it works.

But now I have another problem in conjunction with the Outlook.dll

In the test program, when I try to assign the selected contact to an outlook contact I get the first message below.
I commented out this line and put
Contact.Value = ChooseContact.SelectedContactName
the IDE compiles, but on the device i get an error.

Code:
<font face="Courier New"><font size="2"><font color="#0000ff"><font face="Courier New"><font size="2"><font color="#0000ff">
<font size=
"2"><font face="Courier New"><font color="#0000ff">Sub </font></font></font></font></font></font></font></font></font><font face="Courier New"><font size="2"><font face="Courier New"><font size="2">App_Start</font></font>
<font size=
"2"><font face="Courier New">  frmMain.Show</font></font>
<font size=
"2"><font face="Courier New">  Contact.New1</font></font>
<font size=
"2"><font face="Courier New">  ChooseContact.New1</font></font>
<font size=
"2"><font face="Courier New">  ChooseContact.Show</font></font>
</font></font><font face=
"Courier New"><font size="2"><font color="#008000"><font face="Courier New"><font size="2"><font color="#008000"><font face="Courier New"><font size="2"><font color="#008000">'  Contact.Value = ChooseContact.SelectedContact</font></font></font>
</font></font></font></font></font></font><font face="Courier New"><font size="2"><font face="Courier New"><font size="2">  Contact.Value = ChooseContact.SelectedContactName</font></font>
</font></font><font face=
"Courier New"><font size="2"><font color="#008000"><font face="Courier New"><font size="2"><font color="#008000"><font face="Courier New"><font size="2"><font color="#008000">'  Label1.Text=Contact.LastName</font></font></font>
</font></font></font></font></font></font><font face="Courier New"><font size="2"><font color="#0000ff"><font face="Courier New"><font size="2"><font color="#0000ff"><font face="Courier New"><font size="2"><font color="#0000ff">End Sub</font></font></font>
</font></font></font></font></font></font>
What am I doing wrong ?

Best regards.
Attached Images
File Type: jpg ErrorOnDevice.jpg (25.6 KB, 11 views)
Attached Files
File Type: sbp ChooseContactDialog.sbp (857 Bytes, 21 views)
__________________
Klaus
Switzerland

Beginner's Guide / User's Guide
Reply With Quote
  #7 (permalink)  
Old 10-16-2009, 11:08 AM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 6,072
Awards Showcase
Innovator medal Beta Tester Forum Contributer 
Total Awards: 3
Default

Version 1.1 now posted to try to resolve the optimised compiled problem above. I had to scratch my head for a while as it was not a reference problem but seemed to be due to an unintended difference between the desktop and device libraries but I still don't understand why it produced that particular error - hopefully now fixed. It looks like I only tested in the IDE without optimised compiling, when it would work. I wonder why nobody has found this before - it had about 80 downloads? Maybe they gave up in disgust!

Sources are no longer included as most people don't have the Outlook libraries available on their desktop that are needed for compilation. As I have Visual Studio and the WM5.0 SDK I do have then but I overlooked the fact that most don't. This is probably why Erel doesn't include the source for Outlook.dll in the libraries folder.
__________________
Sorry, but I don't answer questions by PM or email.
Please post your queries in the forum.
Reply With Quote
  #8 (permalink)  
Old 10-16-2009, 11:26 AM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 15,689
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

Quote:
This is probably why Erel doesn't include the source for Outlook.dll in the libraries folder.
That is correct.
Reply With Quote
  #9 (permalink)  
Old 10-16-2009, 02:11 PM
klaus's Avatar
Basic4ppc Expert
 
Join Date: Oct 2007
Location: Fully, Switzerland
Posts: 4,459
Awards Showcase
Forum Contributer Beta Tester Competition Winner 
Total Awards: 3
Default

Thank you Andrew.
It works fine now, in my test program and also in a program from JOTHA, german forum, where we encountered the problem.

Best regards.
__________________
Klaus
Switzerland

Beginner's Guide / User's Guide
Reply With Quote
  #10 (permalink)  
Old 01-02-2010, 11:09 AM
konisek's Avatar
Knows the basics
 
Join Date: Jan 2009
Posts: 55
Default

Can you advise how to use the propertychooser in ChooseDialog? I use the following code:
Code:
ChooseDialog.New1
Contact.New1
ChooseDialog.Show
Contact.Value = ChooseDialog.SelectedContact
Label14.Text=
Contact.LastName & " " & Contact.FirstName
Button8.Text=
Contact.MobileTelephoneNumber
That works fine but I wold like to use the Selected property as shown on the picture below instead of Contact.MobileTelephoneNumber. When I set ChooseDialog.ChooseProperty = True then it does not show the dialog at all.
Attached Images
File Type: jpg taxi2.jpg (22.5 KB, 22 views)
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Parent property ? derez Questions (Windows Mobile) 10 01-29-2009 10:39 AM
Help needed to improve this Folder Chooser tsteward Questions (Windows Mobile) 5 01-22-2009 07:03 PM
Autoscroll-Property Filippo Basic4ppc Wishlist 4 11-23-2008 11:58 AM
ComboBox.Value property Cableguy Questions (Windows Mobile) 3 07-01-2007 02:09 PM
property settin in the pda Cableguy Basic4ppc Wishlist 3 05-10-2007 03:40 PM


All times are GMT. The time now is 06:44 AM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0