-
Apr 28th, 2005, 12:04 PM
#1
Thread Starter
Hyperactive Member
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.
-
Apr 28th, 2005, 01:15 PM
#2
Thread Starter
Hyperactive Member
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.
-
Apr 28th, 2005, 01:30 PM
#3
Thread Starter
Hyperactive Member
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.
-
Apr 28th, 2005, 02:27 PM
#4
Thread Starter
Hyperactive Member
Re: Get MSN Messenger Contacts
Helooooooo. Is there any one who can help me.
Please help me.
-
Apr 28th, 2005, 02:40 PM
#5
Frenzied Member
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?
-
Apr 28th, 2005, 03:07 PM
#6
Thread Starter
Hyperactive Member
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?
-
Apr 28th, 2005, 03:52 PM
#7
Thread Starter
Hyperactive Member
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
-
Apr 28th, 2005, 03:56 PM
#8
Thread Starter
Hyperactive Member
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
-
Apr 28th, 2005, 10:40 PM
#9
Addicted Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|