Results 1 to 9 of 9

Thread: Get MSN Messenger Contacts

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2005
    Posts
    312

    Get MSN Messenger Contacts

    How to get the MSN Messenger Contacts in Vb.net
    I have added a reference to the MessengerAPI class in my project and then wrtitten this code.

    dim a as new MessengerAPI.messenger
    msgbox(a.myContacts) ' this line gives the Error.

    "myContacts" return type is Object and i am getting exception at the above line that "Argument 'prompt cannot be converted to type String'" .

    Is there any one who can solve my problem.

  2. #2

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2005
    Posts
    312

    Re: Get MSN Messenger Contacts

    ok i have got rid of that problem using this code

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    Dim msn As New MessengerAPI.Messenger
    Dim contacts As IMessengerContacts
    Dim i As Integer
    msn.AutoSignin()
    contacts = msn.MyContacts
    While (i < contacts.Count)
    lstContacts.Items.Add(contacts.Item(i))
    i += 1
    End While
    End Sub


    but now i am having another probelm that i am not getting the MSN contacts using the above code. The Form opens and when i click the button theere is no further action.

    Please help.

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2005
    Posts
    312

    Re: Get MSN Messenger Contacts

    its amazing that i am answering my own questions.
    I got rid of that problem as well but now its a new Problem.
    When ever i use this API the msn messenger started to run which i dont want.
    I want only my messenger should run and not the msn messenger.

  4. #4

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2005
    Posts
    312

    Re: Get MSN Messenger Contacts

    Helooooooo. Is there any one who can help me.
    Please help me.

  5. #5
    Frenzied Member dinosaur_uk's Avatar
    Join Date
    Sep 2004
    Location
    Jurassic Park
    Posts
    1,098

    Re: Get MSN Messenger Contacts

    I am pretty amazed that you are the only one answering yourself.

    I am interested in writing a program with msn functions..can you send messages using vb.net?

  6. #6

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2005
    Posts
    312

    Re: Get MSN Messenger Contacts

    yes i am trying that at the moment and hope so i will get that in an hour or so.
    Are you also building the MSN addons?

  7. #7

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2005
    Posts
    312

    Re: Get MSN Messenger Contacts

    well i got to a result that "SENDING MESSAGE THROUGH MESSENGER API IS ALMOST IMPOSSIBLE".
    Can anybody help me in sending a message through MessengerApi

  8. #8

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2005
    Posts
    312

    Re: Get MSN Messenger Contacts

    Furthermore whenever i try to send the message through this api using the following command

    imports MessengerAPI

    dim msn as Messenger
    ..............
    ..............
    msn.instantMessage(MessengerContactObject)


    The Messenger window of MSN for the Specified Contact opens.
    However i want my own textbox message to be sent and not through the MSN MESSENGER WINDOW

  9. #9
    Addicted Member Porsche944's Avatar
    Join Date
    Apr 2005
    Location
    Ann Arbor
    Posts
    182

    Arrow Re: Get MSN Messenger Contacts

    Just a thought but maybe when you make calls to the API the dll file searches to see if MSN Messenger is open and if it's not it will open it. Maybe it needs to be open to access the contact list. Which is probably stored on a server at Microsoft. Maybe there is a way to use other api to directly send a packet to the server to ask for the contact list. Good luck figuring that out tho.

    This might not be the case however.

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