Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
- If True Then
- If openFileDialog1.ShowDialog() = System.Windows.Forms.DialogResult.OK Then
- FolderName = openFileDialog1.FileName
- TextBox1.Text = FolderName
- End If
- End If
- End Sub
- Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
- If True Then
- Dim fullpath As String = System.IO.Path.GetDirectoryName(FolderName)
- Dim fileExist As Boolean = Directory.EnumerateFiles(fullpath, "*.pdf").Any()
- Dim PdfFile As String = (fullpath & Convert.ToString("D:PDF FILES")) + TextBox2.Text + ".pdf"
- If File.Exists(PdfFile) Then
- System.Diagnostics.Process.Start(PdfFile)
- Else
- MessageBox.Show("File is Not present ")
- End If
- End If
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement