You are here: MessengerYouLike.IMSDK > IMSDK Reference > IMSDK Namespace > Classes > Groups Class > Groups Classes > Groups.Group Class > Group Properties > Groups.Group.UID Property
MessengerYouLike
Groups.Group.UID Property

This Property shows the unique ID for this group 

This property is different for each Logged in session means if the user logs out and logs in all groups will be assigned a new GUID

C#
public String UID;
Visual Basic
Public Property UID() As String
[Visual Basic]
 
'Create a new IMClient
Dim MC as new IMSDK.IMClient
 
 
 
'Create a new MCUser
 Public MCUser As New IMSDK.User
 
 
 
'Call the Listen Sub
MC.Listen()
 
 
 
'Now Try to login
MC.BeginLogin(TxtUsername.Text,TxtPassword.Text)
 
 
 
'if username and password is valid then
Private Sub MC_OnLoggedin(ByVal UserObject As IMSDK.User) Handles MC.OnLoggedin
    Debug.WriteLine("Username logged in : " & MCUser.Username & " , " & MCUser.Password)
 
        MCUser = New IMSDK.User
        MCUser = UserObject
        Msgbox("Username is " & MCUser.Username)
 
End Sub
 
 
 
'if username or password is invalid then
Private Sub MC_OnUsernameOrPasswordInvalid(ByVal Username As String, ByVal Password As String) Handles MC.OnUsernameOrPasswordInvalid
  Debug.WriteLine("Username password invalid : " & Username & " , " & Password)
End Sub
 
 
   Function loadlv2() As Boolean
        FriendsTV.Nodes.Clear()
 
 
 
        For i As Integer = 0 To MCUser.Groups.Count - 1
            Dim nd2 As New TreeNode
            With nd2
 
                .ToolTipText = "Online = " & MCUser.Groups.Item(i).TotalOnlineFriends.ToString & _
               "Offline = " & MCUser.Groups.Item(i).TotalOfflineFriends.ToString & _
               "Busy = " & MCUser.Groups.Item(i).TotalBusyFriends.ToString & _
               "unauthorized = " & MCUser.Groups.Item(i).TotalUnAuthFriends
 
                .Text = MCUser.Groups.Item(i).GroupName & " ( " & MCUser.Groups.Item(i).TotalOnlineFriends.ToString & " / " & MCUser.Groups.Item(i).TotalFriends.ToString & " )"
                .Tag = MCUser.Groups.Item(i).UID
            End With
 
            FriendsTV.Nodes.Add(nd2)
 
            Dim fr As IMSDK.Friends = MCUser.Groups.Item(i).Friends
 
            For j As Integer = 0 To fr.Count - 1
                Dim nd3 As New TreeNode
 
                With nd3
                    .Text = fr.Item(j).FriendUsername & " - " & fr.Item(j).FriendStatus.ToString & " - " & fr.Item(j).FriendAuthStatus.ToString & " - " & fr.Item(j).Blocked.ToString & " - " & fr.Item(j).AmIBlocked.ToString & " - " & fr.Item(j).FriendEmail.ToString
                    .Tag = fr.Item(j).FriendUsername
                End With
 
                FriendsTV.Nodes.Item(FriendsTV.Nodes.IndexOf(nd2)).Nodes.Add(nd3)
 
            Next j
 
        Next i
 
        FriendsTV.ExpandAll()
        FriendsTV.Visible = True
 
    End Function
Copyright (c) 2007. All rights reserved.