Open a program when I click a button [solved]

Posts 1–11 of 11 · Page 1 of 1
Open a program when I click a button [solved]
What source/What will I do to make a button open up a program for example ...

Button1 = Opens Any Program ..

Like that

Please help ! TY
process.start("path") ?
Code:
 
  Private Sub Button1_Click(ByVal sender As System.Object, _
        ByVal e As System.EventArgs) Handles Button1.Click

        System.Process.Start("C:\location\programname.exe")

    End Sub
would this work?
Quote Originally Posted by utherson601 View Post
Code:
 
  Private Sub Button1_Click(ByVal sender As System.Object, _
        ByVal e As System.EventArgs) Handles Button1.Click

        System.Process.Start("C:\location\programname.exe")

    End Sub
would this work?
That is just what I wrote previously.
Quote Originally Posted by Blubb1337 View Post
That is just what I wrote previously.

sorry, I didn't see yours.... I had it open already and it didn't load your reply...
Code:
shell("filepathhere\blabla.exe")
could use that too...
And the Process class isn't part of the System namespace. It's in the System.Diagnostics namespace.
'imports are at the top...
imports System.Diagnostics

button_click event

Process.Start("C:\location\programname.exe")
' or
shell("filepathhere\blabla.exe")
System.Diagnostics is imported by default (As is System and a few others) so there is no need for that. Your post was pretty pointless as you JUST mentioned Shell before, and Blubb already said Process.Start.
Okay I just used this code and it worked ..

Code:
Process.Start("programname.exe")
That's it ! /req close
Marked solved then. You guys know the deal (or you should). No more posting unless you have a question about the solution.
Posts 1–11 of 11 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Talk with us