Home All Groups Group Topic Archive Search About

Calling Program A from Program B

Author
5 Feb 2006 2:36 AM
fripper
I want to write a sort of "program manager" (in VB 2005) from which users
can select from a list of other programs I have written ... and then when
the user exits that program have control come back to the program manager so
the user can select another program to be executed.  I do not know how to
call one program from another ... or how to return to the calling program.
I have looked through the "How to's" in VB 2005 Help but did not find this
subject broached.  Any thoughts would be appreciated.

Thanks.

Author
5 Feb 2006 4:14 AM
Chris
fripper wrote:
> I want to write a sort of "program manager" (in VB 2005) from which users
> can select from a list of other programs I have written ... and then when
> the user exits that program have control come back to the program manager so
> the user can select another program to be executed.  I do not know how to
> call one program from another ... or how to return to the calling program.
> I have looked through the "How to's" in VB 2005 Help but did not find this
> subject broached.  Any thoughts would be appreciated.
>
> Thanks.
>
>
>

Look at the Process class.  It will let you launch new programs.  When
your "child" process closes down have it launch the program manager again.

chris
Author
5 Feb 2006 6:50 AM
Cor Ligthert [MVP]
Fripper,

In addition to Chris a simple sample.

\\\Notepad
Dim p As New Process
Dim pi As New ProcessStartInfo
pi.arguments = "c:\windows\win.ini"
pi.FileName = "notepad.exe"
p.startinfo = pi
p.Start()
///

I hope this helps,

Cor
Author
5 Feb 2006 12:22 PM
Herfried K. Wagner [MVP]
"fripper" <yo***@indiana.edu> schrieb:
> I want to write a sort of "program manager" (in VB 2005) from which users
> can select from a list of other programs I have written ... and then when
> the user exits that program have control come back to the program manager
> so the user can select another program to be executed.  I do not know how
> to call one program from another ... or how to return to the calling
> program.

'System.Diagnostics.Process'.

--
M S   Herfried K. Wagner
M V P  <URL:http://dotnet.mvps.org/>
V B   <URL:http://classicvb.org/petition/>