Results 1 to 6 of 6

Thread: Two Problems: Hiding Start Menu; Editing contacts in POutlook.

  1. #1

    Thread Starter
    New Member
    Join Date
    Nov 2006
    Posts
    8

    Two Problems: Hiding Start Menu; Editing contacts in POutlook.

    Ok my first question is this: How can I hide the Start menu in windows mobile 5 and 6 using system states and such through VB .NET 2008? I was shown how to do it, but I forgot how.


    Also for Pocket Outlook.

    I want to use a "for each" to loop through every contact and add each contact to a new category that I choose. How can I do that?

    I played around with it, I just dont know what to " For Each" and I dont know how, once I loop through the contacts to change the category. So How do I loop through them and how do I add them to a category?

    Thanks in advance for your help.

    Just so you know this is some code I came up with. But I dont know if its correct:
    --------------------------------------
    Imports System

    Imports System.Collections.Generic

    Imports System.Text

    Imports Microsoft.WindowsMobile.PocketOutlook


    In the button click command:

    Dim outlookSession As New OutlookSession()
    Dim contactCollection As ContactCollection = outlookSession.Contacts.Items
    Dim contact As Contact = contactCollection(0)

    For Each contact in contacts
    contact.categories = "Holiday"
    contact.update
    Next

    outlookSession.Dispose()

    --------------------------

    Any ideas?
    Last edited by jdiperla; Feb 5th, 2009 at 12:39 PM.

  2. #2
    Frenzied Member
    Join Date
    Oct 2005
    Posts
    1,286

    Re: Two Problems: Hiding Start Menu; Editing contacts in POutlook.

    As far as hiding the start menu, there is a great video on screen elements by Jim Wilson here

    The other part of your question should be dealt with here
    Pete Vickers
    MVP - Device Application Development
    http://www.gui-innovations.com http://mobileworld.appamundi.com/blogs/

  3. #3

    Thread Starter
    New Member
    Join Date
    Nov 2006
    Posts
    8

    Re: Two Problems: Hiding Start Menu; Editing contacts in POutlook.

    I hate to bring up a dead topic. But I really need help. What I am trying to do is create code that will cycle through all my contacts and add the same category to each one until it reaches the last contact.

    Here is my code:
    Code:
    Imports System
    
    Imports System.Collections.Generic
    
    Imports System.Text
    
    Imports Microsoft.WindowsMobile.PocketOutlook
    In my Form load:

    Code:
    Dim outlookSession As New OutlookSession()
    Dim intCount As Integer
    Dim myContact As ContactCollection = outlookSession.Contacts
    
     For intCount = 0 To myContacts.Count - 1
    contact.categories = "Holiday"
    contact.update
            myContact = myContacts.Item(intCount)
       Next
    
    outlookSession.Dispose()
    What am I doing wrong? Please help. Thanks in advance.
    Last edited by jdiperla; May 8th, 2009 at 10:29 AM.

  4. #4
    Frenzied Member
    Join Date
    Oct 2005
    Posts
    1,286

    Re: Two Problems: Hiding Start Menu; Editing contacts in POutlook.

    Are you getting errors?
    Is it not working?

    What's the problem?
    Pete Vickers
    MVP - Device Application Development
    http://www.gui-innovations.com http://mobileworld.appamundi.com/blogs/

  5. #5
    Frenzied Member Lightning's Avatar
    Join Date
    Oct 2002
    Location
    Eygelshoven
    Posts
    1,611

    Re: Two Problems: Hiding Start Menu; Editing contacts in POutlook.

    That code can't work, this might:
    Code:
    Dim outlookSession As New OutlookSession()
    Dim intCount As Integer
    Dim myContacts As ContactCollection = outlookSession.Contacts
    dim myContact as Contact
     For intCount = 0 To myContacts.Count - 1
    myContact = myContacts.Item(intCount)
    myContact.categories = "Holiday"
    myContact.update
            
       Next
    
    outlookSession.Dispose()
    VB6 & C# (WCF LINQ) mostly


    If you need help with a WPF/WCF question post in the NEW WPF & WCF forum and we will try help the best we can

    My site

    My blog, couding troubles and solutions

    Free online tools

  6. #6

    Thread Starter
    New Member
    Join Date
    Nov 2006
    Posts
    8

    Re: Two Problems: Hiding Start Menu; Editing contacts in POutlook.

    Yep. I had actually figured it out before you posted. That was the exact code I used. Thanks for your help though.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width