This project is read-only.

List all dropbox folders into TreeNode

Mar 4, 2013 at 8:48 PM
I am trying to list all folders (like windows 7 explorer listview) from dropbox root folder.

I have the following code but it doesn't work properly:
            Dim y As New TreeNode
                SetWindowTheme(TreeView1.Handle, "explorer", Nothing)
                If DropboxUpload.DropBoxStorage.GetRoot.HasChildrens = nChildState.HasChilds Then
                For Each t In DropboxUpload.DropBoxStorage.GetRoot
                    Dim bIsDirectory As Boolean = TypeOf t Is ICloudFileSystemEntry
                    If bIsDirectory = True Then
                        y.Text = t.Name
                        y.Tag = "/" & t.Name
                        If DropboxUpload.DropBoxStorage.GetFolder("/" & DropboxUpload.DropBoxStorage.GetRoot.Name & "/" & t.Name).HasChildrens = nChildState.HasChilds Then
                            For Each d In DropboxUpload.DropBoxStorage.GetFolder("/" & DropboxUpload.DropBoxStorage.GetRoot.Name & "/" & t.Name)
                                Dim hy As Boolean = TypeOf d Is ICloudFileSystemEntry
                                If hy = True Then
                                    y.Nodes.Add(New TreeNode With {.Text = d.Name, .Tag = y.Tag & "/" & d.Name})
                                End If
                        End If
                    End If
                End If
        Catch ex As Exception
            MsgBox(ex.Message & vbNewLine & ex.StackTrace)
        End Try
Can anybody find a way to do this. Thank you.