Question

I am trying to select a program with a OpenFileDialog

what i want to do is select that file and open it up when i click on the second button

And also i was wondering is it possible to add internet priority to this program?

Public Class Form1

Private Sub PictureBox1_Click(sender As Object, e As EventArgs)

End Sub


Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click

End Sub

Private Sub OpenFileDialog1_FileOk(sender As Object, e As System.ComponentModel.CancelEventArgs) Handles OpenFileDialog1.FileOk

End Sub

Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click

End Sub

End Class
Was it helpful?

Solution

Try using this

Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
    Try
        OpenFileDialog1.ShowDialog()
        System.Diagnostics.Process.Start(OpenFileDialog1.FileName)
    Catch ex as Exception
    End Try
End Sub
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top