Basic4ppc - Windows Mobile Development  

Go Back   Basic4ppc - Windows Mobile Development > Main Category > Questions & Help Needed
Home Register FAQ Members List Search Today's Posts Mark Forums Read

Questions & Help Needed Post any question regarding Basic4ppc.


Custom contact list


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 08-09-2008, 12:26 AM
Newbie
 
Join Date: Jul 2008
Posts: 9
Default Custom contact list

Hi guys,

I'm absolutely new at this, and my experience is in PHP and Oracle, and I have never tried any .Net development or similar. Nevertheless I really would like to develop some stuff for my HTC, for WM6.

After reading some of the examples, and successfully finishing the first tutorial, my goal was to build a custom contact list. I was incredibly pleased to see that the following example was available:

'Contact is a Contact object and ContactsCollection is a PimCollection object.
Sub Globals

End Sub

Sub App_Start
Form1.Show
Contact.New1
ContactsCollection.New1("Contacts")
ContactsCollection.SortItems("FirstName",false) 'sorts the contacts using the first name field.
For i = 0 to ContactsCollection.Count - 1
Contact.Value = ContactsCollection.GetItem(i)
ListBox1.Add(Contact.FirstName & " " & Contact.LastName) 'Add the contact's first and last name to ListBox1.
Next
End Sub

The problem is that a simple copy and paste doesn't work. I get loads of errors and it doesn't allow me to run it.

I would like to know what should I do do make it run. It seems a very good start for what I need.

Any help would be great!

Thanks in advance,

Dinis
Reply With Quote
  #2 (permalink)  
Old 08-09-2008, 09:49 AM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 3,132
Default

Welcome!
The steps to run this example are:
- Create a Form and add a Listbox.
- Add a reference to Outlook (device) and OutlookDesktop (desktop).
- Add a Contacts object named Contacts.
- Add a PimCollection object named ContactsCollection.

Or download the attached example
Attached Files
File Type: zip Contacts.zip (13.6 KB, 20 views)
Reply With Quote
  #3 (permalink)  
Old 08-30-2008, 12:51 AM
Newbie
 
Join Date: Jul 2008
Posts: 9
Default

Hi Erel,

Many thanks for your reply!

I've downloaded the example, loaded the dll files into Basic4PPC under Tools->Components, ran the script, and I can't see my Outlook contacts.
All I get is the form displayed with an empty list...

I must be doing something wrong. What else do I need to do?

Once again, thank you for your help,

Dinis
Reply With Quote
  #4 (permalink)  
Old 08-30-2008, 01:00 AM
Cableguy's Avatar
Basic4ppc Expert
 
Join Date: Apr 2007
Location: N 41º11'30.30" W 8º39'46.60"
Posts: 1,314
Default

The Outlook DLL is meant ONLY for the DEVICE, the desktop dll is a dummy to alow the development of an outlook based aplication...
So to try it you must either run it on an emulator, or directly on the device..
__________________
Paulo Gomes
Porto, Portugal

PC: Dual-Core 1,8Ghz, 2GB RAM, 80GB HD
PPC: Qtek9000, 1GB SD

DLL Version Listing
Reply With Quote
  #5 (permalink)  
Old 08-30-2008, 01:03 AM
Newbie
 
Join Date: Jul 2008
Posts: 9
Default

Hi Paulo,

what emulator do you suggest?
I really would like to get this thing running.

Cheers,

Dinis
Reply With Quote
  #6 (permalink)  
Old 08-30-2008, 01:10 AM
Cableguy's Avatar
Basic4ppc Expert
 
Join Date: Apr 2007
Location: N 41º11'30.30" W 8º39'46.60"
Posts: 1,314
Default

Check-out this thread:
__________________
Paulo Gomes
Porto, Portugal

PC: Dual-Core 1,8Ghz, 2GB RAM, 80GB HD
PPC: Qtek9000, 1GB SD

DLL Version Listing
Reply With Quote
  #7 (permalink)  
Old 08-30-2008, 10:48 PM
Newbie
 
Join Date: Jul 2008
Posts: 9
Default

Cheers Paulo, I have downloaded the WM6 emulator from Microsoft.
I have opened another thread in the forum because I'm having problems seeing the virtual machines.
I'll come back to this entry as soon as I have news.

Thanks for your help.

Dinis
Reply With Quote
  #8 (permalink)  
Old 08-31-2008, 12:26 AM
Newbie
 
Join Date: Jul 2008
Posts: 9
Default

Ok, now I have an emulator running WM6 and it's connected via ActiveSync 4.5.

How can I put the code gently supplied by Erel running in the emulator?
I assume I have to compile the code and then put the cab to run in the mobile.
If that is the case, my version doesn't allow me to compile anything. I'm using the desktop version.

Any suggestions?

Cheers
Reply With Quote
  #9 (permalink)  
Old 08-31-2008, 10:41 AM
Cableguy's Avatar
Basic4ppc Expert
 
Join Date: Apr 2007
Location: N 41º11'30.30" W 8º39'46.60"
Posts: 1,314
Default

Try "instaling" the device version of b4ppc, and copy your code to a foder in the emulator, and run the device IDE, load your code, and run it...
__________________
Paulo Gomes
Porto, Portugal

PC: Dual-Core 1,8Ghz, 2GB RAM, 80GB HD
PPC: Qtek9000, 1GB SD

DLL Version Listing
Reply With Quote
  #10 (permalink)  
Old 08-31-2008, 12:18 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 3,132
Default

You can set the emulator storage card to one of your folders.
Download the device IDE (cab file) from this page: Basic4ppc - Windows Mobile programming and Pocket PC Development
Copy it to the same folder you set as the storage card folder.
Install it from the emulator.
You can also copy dll files and source code to this folder and use it from the emulator.
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 On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Contact.update verschiebt Collection-List Paulsche German Forum 0 10-01-2008 12:08 AM
Contact.WebPage in Oulook.dll does not work JOTHA Bug Reports 4 09-19-2008 11:42 AM
Show contact details ? taximania Questions & Help Needed 3 07-05-2008 08:19 PM
C# Custom control creation Cableguy Questions & Help Needed 2 05-19-2008 02:04 PM
Custom function go4saint Questions & Help Needed 5 04-08-2008 08:24 PM


All times are GMT. The time now is 02:17 PM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.1.0