ananth3125 0 Newbie Poster

here in the below coding i got the filenames displayed in the listbox, but i need the option for selecting .doc or .rtf which is to in dropdown in text box by selecting the selected fileformats to be displayed in the textbox.........

Using flb As New FolderBrowserDialog
            If flb.ShowDialog() = Windows.Forms.DialogResult.OK Then
                ListBox1.Items.Clear()
                TextBox1.Text = flb.SelectedPath
                Dim fileNames As String() = Directory.GetFiles(flb.SelectedPath)
                Dim selectedFiles As String() = From fileName In fileNames Where fileName.EndsWith(".rtf") Or fileName.EndsWith(".doc") Select fileName
                For Each filename In selectedFiles
                    ListBox1.Items.Add(filename)
                Next
            End If
        End Using
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.