You are here: MessengerYouLike.IMSDK > IMSDK Reference > IMSDK Namespace > Classes > Friends Class > Friends Classes > Friends.MFriend Class > MFriend Properties > Friends.MFriend.AmIBlocked Property
MessengerYouLike
Friends.MFriend.AmIBlocked Property

This Property shows that wether the logged in user is blocked by this Friend or not

C#
public Boolean AmIBlocked;
Visual Basic
Public Property AmIBlocked() As Boolean

This Property may be updated when 

This sub is called 

IMSDK.IMClient.BeginFriendBlockUnBlock 

and this property will be updated automatically when this event is fired 

IMSDK.IMClient.OnFriendAMIBlocked  

[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
                    .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.