Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Launch an External Application

Best Practices

Launch an External Application

by  ca8msm  Posted    (Edited  )
Prior to the release of the .NET framework, developers using older programming languages (such as VB6) often used commands such as Shell or ShellExecute to launch an external program.

The .NET framework brings us it's own version and allows us much more control. This version uses the System.Diagnostics.Process class and an example of how to use it is:
Code:
        Dim MyProcess As New System.Diagnostics.Process
        MyProcess.StartInfo.CreateNoWindow = True
        MyProcess.StartInfo.UseShellExecute = True
        MyProcess.StartInfo.WorkingDirectory = "C:\MyDirectory\"
        MyProcess.StartInfo.FileName = "MyApplication.exe"
        MyProcess.StartInfo.Arguments = "MyArgument"
        MyProcess.Start()

NOTE: This will launch the application on the server, not the client's machine.
Register to rate this FAQ  : BAD 1 2 3 4 5 6 7 8 9 10 GOOD
Please Note: 1 is Bad, 10 is Good :-)

Part and Inventory Search

Back
Top