A user in the MSDN forums asked the following question in the following thread:
Hello, I am very new to programming and would like some help. I need a program that will search in a supplied folder and list all PDF type of file in a text box, and then have the operator select the file to open.
Can someone show me the code to do this?
Here is how I would.
''' <summary> ''' Returns the path to a pdf file that the user selected. Returns a blank if the user cancelled. ''' </summary> ''' <returns></returns> ''' <remarks></remarks> Function OpenPDF() As String Dim OFD As New OpenFileDialog OFD.Filter = "Pdf Files|*.pdf" If OFD.ShowDialog = DialogResult.OK Then Return OFD.FileName End If Return "" End Function