You are here: MessengerYouLike.IMSDK > IMSDK Reference > IMSDK Namespace > Classes > FileTransfersCollection Class > FileTransfersCollection Methods > FileTransfersCollection.GetCount Method
MessengerYouLike
FileTransfersCollection.GetCount Method

This Method shows the total number of File Transfers in progress

C#
public int GetCount();
Visual Basic
Public Function GetCount() As Integer

This Class is a collection of IMSDK.FileTransfer so this method tells how many objects of file transfers are in progress, IMSDK.FileTransfer object is removed from the collection automatically once it is complete

[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
 
 
 
private function GetFTCount() as integer
   return MCUser.FileTransfers.GetCount
end function
Copyright (c) 2007. All rights reserved.