Pregunta

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
¿Fue útil?

Solución

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
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top