How retrieves contact - Printable Version
-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Skype & Technology (/forumdisplay.php?fid=9)
+---- Forum: Tech Talk (/forumdisplay.php?fid=17)
+----- Thread: How retrieves contact (/showthread.php?tid=38334)
How retrieves contact by Zick on 02-12-2005 at 08:13 PM
Hello, I'm currently condig a programm in Visual Basic and I've a little problem. In fact, I want to retrieves all name of all contact of the msn, and I proceed by groups like this :
code: Public Contacts As MessengerAPI.IMessengerContacts
Public Contact As MessengerAPI.IMessengerContact
Public Groups As MessengerAPI.IMessengerGroups
Public Group As MessengerAPI.IMessengerGroup
Public mProperty As MCONTACTPROPERTY
Public mPhone As MPHONE_TYPE
Public msn As MessengerAPI.Messenger
Private Sub Command1_Click()
Set msn = New MessengerAPI.Messenger
Dim i, j, k As Long
Dim tGroup, tPhone, tProperty As String
i = 0
j = 0
k = 0
List4.Clear
List5.Clear
List6.Clear
List7.Clear
Set Groups = msn.MyGroups
For k = 0 To Groups.Count - 1
Set Group = Groups( k)
tGroup = Group.Name
Set Contacts = Group.Contacts
For j = 0 To Contacts.Count - 1
i = j + 1
Set Contact = Contacts(j)
mPhone = MPHONE_TYPE_MOBILE
mProperty = MCONTACTPROP_EMAIL
tkey = "item" & k & "-" & i
List4.AddItem Contact.FriendlyName
List5.AddItem Contact.SigninName
List6.AddItem Contact.Status
List7.AddItem Group.Name
Next
Next
End Sub
But if I hadn't put contact in groupe et display my contact by online/offline, no contact appears in list.
So how can I do for see the contact in the group ONline/Offline ?
RE: How retrieves contact by RaceProUK on 02-12-2005 at 09:39 PM
Can you use [code] tags please? Groups looks just plain wrong...
Anyway...
The Contacts collection can handle any grouping of contacts, so msn.MyContacts is what you want for online/offline.[/code]
RE: How retrieves contact by ShawnZ on 02-12-2005 at 10:43 PM
quote: Originally posted by Zick
Hello, I'm currently conding a program in Visual Basic and I've got a little problem. In fact, I want to retrieve the names of all contacts on my msn, and I proceed by groups like this :
code: Public Contacts As MessengerAPI.IMessengerContacts
Public Contact As MessengerAPI.IMessengerContact
Public Groups As MessengerAPI.IMessengerGroups
Public Group As MessengerAPI.IMessengerGroup
Public mProperty As MCONTACTPROPERTY
Public mPhone As MPHONE_TYPE
Public msn As MessengerAPI.Messenger Private Sub Command1_Click()
Set msn = New MessengerAPI.Messenger
Dim i, j, k As Long
Dim tGroup, tPhone, tProperty As String
i = 0
j = 0
k = 0
List4.Clear
List5.Clear
List6.Clear
List7.Clear
Set Groups = msn.MyGroups
For k = 0 To Groups.Count - 1
Set Group = Groups
tGroup = Group.Name
Set Contacts = Group.Contacts
For j = 0 To Contacts.Count - 1
i = j + 1
Set Contact = Contacts(j)
mPhone = MPHONE_TYPE_MOBILE
mProperty = MCONTACTPROP_EMAIL
tkey = "item" & k & "-" & i
List4.AddItem Contact.FriendlyName
List5.AddItem Contact.SigninName
List6.AddItem Contact.Status
List7.AddItem Group.Name
Next
Next
End Sub
But if I hadn't sorted my contacts in group display but rather by online/offline, no contacts appear in the list.
So how can I see the contacts when sorted in Online/Offline ?
Put code tags around it and made a futile attempt at ajusting the spacing. Hope this makes it a little easier to read. lol, don't get me confused with Zick who origionally posted this!
RE: How retrieves contact by Zick on 02-12-2005 at 10:46 PM
Sorry I'm new here ...
I'm gonna try with msn.MyContact No matter , anyway the problem is fixed.
Sorry for my english but I'm french an I don't speak english very well
|