My notepad program in vb is stored in C:\libraries\My Documents\Visual Studio 2010\Projects\notepad\notepad\bin\debug\notepad.exe
And my Tic-Tac-Toe program is stored in C:\libraries\My Documents\Visual Studio 2010\Projects\Tic-Tac-Toe\Tic-Tac-Toe\bin\debug\Tic-Tac-Toe.exe
These are the paths of the applications(the ones which will run when double clicked)
Now, I want to create a third project in visual basic. It will have only two buttons. One, to run tic-tac-toe and the other to run notepad. How do I achieve this? That is, how do I make one project run when I click a button on another project?
You simply need to call the
Process.Startmethod and pass it the file path of the executable you want to launch. There are other ways of doing it that provide more flexibility, but I imagine that’s sufficient for what you need. For instance:However, I would recommend putting the path in the app.config or some other configuration location because that path will likely change on other PC’s.