Launch other application in VB.Net and get object of instance
Say I have two or more applications in Visual Studio. They are both Windows forms. Application1 has a listbox. Is it possible, without referencing the other projects, to launch the other applications from the location where their executable file is, and get some form of reference or object of that instance, so from Application1 I can close it, or perform actions on it such as maximize/minimize? Thanks.
Re: Launch other application in VB.Net and get object of instance
Hi, you can easy enough start another program provided you know the path with
Code:
Process.Start("pathtotheprogramexe")
if you want to be able to close it then something like
Code:
Dim gg As New Process
gg.StartInfo.FileName = "path to file exe"
gg.Start()
gg.WaitForExit()
gg.Close()
that will open it then close it right away but shows the point. as for min and max the window i dont really know but looking up the window handles may be of help