How do I have launch an application with a button/text?  
Author Message
trav1085





PostPosted: Visual Basic Express Edition, How do I have launch an application with a button/text? Top

I'm making a little program that will launch a appliation when you click a piece of text, I want it to launch setup.exe when the user presses the "Install" text.

What code do you use to get it to directly launch a file, say D:\setup.exe, I know it's should be in the Onclick area

Thanks for your help, as I'm new to visual studio. (*I don't want a dialog box for the file, a direct link)




Visual Studio Express Editions26  
 
 
deodorant





PostPosted: Visual Basic Express Edition, How do I have launch an application with a button/text? Top

System.Diagnostics.Process.Start("D:\Setup.exe")



 
 
spotty





PostPosted: Visual Basic Express Edition, How do I have launch an application with a button/text? Top

Use a link label control on a form

and then simply put the following call in the click event.

Private Sub LinkLabel1_LinkClicked(ByVal sender As System.Object, ByVal e As System.Windows.Forms.LinkLabelLinkClickedEventArgs) Handles LinkLabel1.LinkClicked
System.Diagnostics.Process.Start("c:\Setup.exe")
End Sub