TMI Posted November 3, 2003 Posted November 3, 2003 I am trying to start an external application by sending th e required arguments as part of the command line call. Everything works fine but the external app opens up behind what ever application is at the top. I am also using the sendkey for {F6} so the the application will do a function. But the application will not open over the other apps. If I use an input box for the arguments before opening the external application then it runs fine. Here is the code that I have. Can anyone help? Public Sub runArdis() 'Time to open Ardis and generate patterns Dim myProcess As New Process() Dim startInfo As New System.Diagnostics.ProcessStartInfo("COWIN.exe") startInfo.FileName = "j:\projects\" & curProject & "\PATTERN\" _ & ProductType & Phase & "\" & patProd & Phase & ".R41" startInfo.WindowStyle = ProcessWindowStyle.Normal Try myProcess = System.Diagnostics.Process.Start(startInfo) Catch ex As Exception MsgBox("runArdis Error! " & ex.Message) End Try End Sub Quote
*Experts* mutant Posted November 3, 2003 *Experts* Posted November 3, 2003 That code opens application like you want good for me. Maybe other windows are set as top most. Quote
TMI Posted November 3, 2003 Author Posted November 3, 2003 I was able to use the call shell(".......") that included all of the arguments that I needed. So I no longer have to use the sendkey and teh program runs no matter what the window status is. Call Shell("c:\ardis\ThisProgram.exe j:\projects\" & curProject & "\PATTERN\" _ & ProductType & Phase & "\" & patProd & Phase & _ ".R41 /Start=c:\ardis\Optimize.mco", AppWinStyle.NormalFocus) Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.