Private Sub EditPDFToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles EditPDFToolStripMenuItem.Click Dim objProcess As System.Diagnostics.Process Dim ProcessPath As String = "C:\Program Files\Foxit Software\PDF Editor\PDFEdit.exe " Try Dim procList() As Process = System.Diagnostics.Process.GetProcessesByName("AcroRd32") If procList.GetUpperBound(0) >= 0 Then For prc As Integer = 0 To procList.GetUpperBound(0) If procList(prc).ProcessName = "AcroRd32" Or procList(prc).ProcessName = "Acrobat.exe" Then 'Kill Arcobat Reader Application procList(prc).Kill() procList(prc).Close() End If Next prc End If objProcess = New System.Diagnostics.Process() objProcess.StartInfo.FileName = ProcessPath objProcess.StartInfo.Arguments = sFilePath & "\" & sFileName objProcess.StartInfo.WindowStyle = ProcessWindowStyle.Normal objProcess.Start() objProcess.WaitForExit() objProcess.Close() MyWebBrowser.Refresh() Catch err As System.Exception MessageBox.Show(err.Message) MessageBox.Show("Could not start process " & ProcessPath, "Error") End Try End Sub
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)