Dialog type should be Folder Dialog and not of the type FileDialog but I am not sure of that.